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
Hello Clearml Ppl

Hello clearml ppl 🙂 ,
I have a question about adding some new field to clearml UI/ and to the API. My goal is to filter all the tasks using this field.

So imagine I have an id from a database I want to add as metadata to every clearml.Task() , for instance customer_id . Then I want to be able to see from UI and eventually from the API all the Task related to that specific id. I know I could use some tags or some parameter , but I think both ways are kind of hack. The tags will probably work, but if then I start to have other tags (such as product_id , and then insurance_id ) I may end up with many many tags.

Is there a better way to really add a field and use that when I create a Task.init() ? so that in UI it also shows this field as a columns?

Thanks you very much guys 🙂

  
  
Posted 2 years ago
Votes Newest

Answers 7


ok this makes sense, but how do I filter this tasks using the parameters? CostlyOstrich36

Imagine I create this task with a given parameters --
task = Task.init(project_name='examples', task_name='Hyper-parameters example') parameters= {"customer_id" : 100} parameters = task.connect(parameters)
When is time to filter all tasks with customer_id = 100 , what can I use?

I tried this, but is not working ...
from clearml.backend_api.session.client import APIClient client = APIClient() r = client.tasks.get_all(_all_={"pattern":"100", "fields":["parameters.application_id.value"]})

  
  
Posted 2 years ago

Thank you very much 🙂 I guess I finished the free tips !

Not sure why this is not working, but will give it a try ! thanks anyway if you can't help 🙂
response = client.tasks.get_all( order_by=["-last_update"], _all_={"pattern":"100", "fields":["hyperparams.custom_id.value"]} )

  
  
Posted 2 years ago

FreshKangaroo33 ,

On the top right of the experiments view you have a cog wheel, if you click on it, it will give you an option to add hyper parameters to the table. I think from the API calls from there you can figure something out 🙂

  
  
Posted 2 years ago

very nice 🙂
CostlyOstrich36 I was trying to filter things using some parameters, but I was not really able to filter them before fetching the a given task... can you send some syntax or examples I can look ?

  
  
Posted 2 years ago

Hi FreshKangaroo33 ,

I think you could use a special hyper parameter for it. This way you can have it show up in the UI as a column. This way it would take any argument you want AND you can filter by it 🙂

  
  
Posted 2 years ago

FreshKangaroo33 , what do you mean by syntax examples?
I think this should give you some context on usage 🙂
https://github.com/allegroai/clearml/blob/master/examples/reporting/hyper_parameters.py

  
  
Posted 2 years ago

FreshKangaroo33 , I'll play with it a bit to see what works 🙂

  
  
Posted 2 years ago
900 Views
7 Answers
2 years ago
one year ago
Tags
Similar posts