Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Looking At The Docs.. I Couldn'T Find A Way To Cleanup The Experiments... Only Archive Them... I Also Noticed

looking at the docs.. i couldn't find a way to cleanup the experiments... only archive them... i also noticed AgitatedDove14 mentioned the https://github.com/allegroai/trains/blob/master/examples/services/cleanup/cleanup_service.py which cleans archived experiments older than 30 days... is thats the only way to do it or is there any plan to have inbuilt support for it

  
  
Posted 4 years ago
Votes Newest

Answers 8


Unfortunately, it is not possible to delete an experiment using the UI. You can run the script as a service like in the example or run it with job scheduler (crontab for example in linux) to execute it.

Can this do the trick?

  
  
Posted 4 years ago

that seems like a bit of extra thing a user needs to bother about.. better deployment model should be that its part of api-server deployment and configurable from UI itself.. may be i am asking too much 😛

  
  
Posted 4 years ago

yes delete experiments which are old or for some other reason are not required to keep around

  
  
Posted 4 years ago

TimelyPenguin76 is there any way to do this using UI directly or as a schedule... otherwise i think i will run the cleanup_service as given in docs...

  
  
Posted 4 years ago

i think for now it should do the trick... was just thinking about the roadmap part

  
  
Posted 4 years ago

Hi PompousParrot44 , you mean delete experiment?

  
  
Posted 4 years ago

You can loop over the tasks you want to delete, Based on the cleanup service:

` import logging

from trains.backend_api.session.client import APIClient

client = APIClient()

you can get the tasks you want to delete with client.tasks.get_all, in this example we will get you all the tasks in a project, but you have other filters too

tasks = client.tasks.get_all(project=[<your project id>])
for task in tasks:
try:
# try delete a task from system
client.tasks.delete(task=task.id) # you also have a force param, you can add force=True if you like
except Exception as ex:
logging.warning(
"Could not delete Task ID={}, {}".format(
task.id, ex.message if hasattr(ex, "message") else ex
)
) `This will delete all the tasks in a project for example

  
  
Posted 4 years ago

PompousParrot44 obviously you can just archive a task and run the cleanup service, it will actually delete archived tasks older than X days.
https://github.com/allegroai/trains/blob/master/examples/services/cleanup/cleanup_service.py

  
  
Posted 4 years ago