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
How Should I Edit The

How should I edit the Cleanup Service so I can filter deleted tasks on project / task name?

https://github.com/allegroai/clearml/blob/master/examples/services/cleanup/cleanup_service.py

This is the code, I tried finding the source code for APIClient.task.get_all but couldn't find anything

  
  
Posted 3 years ago
Votes Newest

Answers 16


Very similar to a task, a project has also a unique identifier - the ID (Although I think project names are also unique)

You can get the project ID either from UI (If you go to a specific project, the project ID will be in the url) or from the api as documented in:
https://clear.ml/docs/latest/docs/references/api/projects#post-projectsget_all
or from the sdk as documented here:
https://clear.ml/docs/latest/docs/references/sdk/task#taskget_project_id

Plug that project ID into the filter of tasks.get_all and you'll get what you're looking for 🙂

  
  
Posted 3 years ago

WackyRabbit7 , please skim over here 🙂
https://clear.ml/docs/latest/docs/references/api/tasks#post-tasksget_all

  
  
Posted 3 years ago

Hi WackyRabbit7 ,

You can find all the api docs https://clear.ml/docs/latest/docs/references/api/index , and for task.get_all https://clear.ml/docs/latest/docs/references/api/tasks#post-tasksget_all 🙂

  
  
Posted 3 years ago

WackyRabbit7 don't you know everything has an ID? 😆 even I do 😉

  
  
Posted 3 years ago

I did, but I only find task name, I'm looking to filter by the project

  
  
Posted 3 years ago

Hahahah thanks for the help SuccessfulKoala55 & CostlyOstrich36

I really do feel it would be a nice to have the ability to easily configure the Cleanup Service to cleanup only specific projects / tasks as its a common use case to have a project dedicated for debugging and alike

  
  
Posted 3 years ago

I know tasks have a name and an ID - but projects?

  
  
Posted 3 years ago

I only found Project ID, which I'm not sure what this refers to - I have the project name

  
  
Posted 3 years ago

thx TimelyPenguin76
skimming over this, I can't find how to filter by project name or something similar

  
  
Posted 3 years ago

Well, since it's part of the example code, we would welcome any contributions/PRs 🙂

  
  
Posted 3 years ago

I meant the cleanup service is part of the examples 🙂 - you're welcome to add this option (like CostlyOstrich36 said earlier), and add it to the example code in a PR

  
  
Posted 3 years ago

bottom line I want to edit the cleanup service code to only delete tasks under a specific project - how do I do that?

  
  
Posted 3 years ago

Example code? I didn't see anywhere an example of filtering using project name

  
  
Posted 3 years ago

what does project ID mean?

  
  
Posted 3 years ago

I might just do that, it will be my second contribution to ClearML 🙂

  
  
Posted 3 years ago
960 Views
16 Answers
3 years ago
one year ago
Tags