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
Hi All. I'Ve Been Mistakenly Using

Hi all. I've been mistakenly using connect_configuration instead of set_parameters on the Task object, and, as I found out, I cannot use any of the configuration parameters to filter, sort, etc my runs.
I thought about looping over all the existing tasks, getting their configurations ( tasks.ConfigurationItem objects) and saving their value s as parameters, but I hit a snag: I don't see an easy way to parse these back into a python dictionary - they are neither yaml nor json strings.
Anyone happen to know what the format of these strings is? Any ideas of how to get closer to my goal are greatly appreciated.
Thanks

  
  
Posted one year ago
Votes Newest

Answers 12


Can you please post the response section?

  
  
Posted one year ago

I'm not sure how to access the developer tools 😳

  
  
Posted one year ago

UI

  
  
Posted one year ago

And go to network. Then filter by XHR

  
  
Posted one year ago

Hi SweetBadger76 , thanks, I think I've made it work. The main point of confusion was between dealing with different type of Task objects (i.e. clearml.backend_api.services.v2_13.tasks.Task returned by get_all , which don't have any of those methods).
Interestingly, set_parameters didn't just work as expected, I had to flatten the dicts myself (which clearml apparently does on its own when I call set_parameters on a new task.
Thank you all. 🙏

  
  
Posted one year ago

WittyOwl57
To get task Id's use (e.g. all the tasks of a specific project):
task_ids = Task.query_tasks(project_name="examples", task_filter={'status': ["completed"])Then per task:
for t_id in tasks_id: t = Task.get_task(t_id) conf_dict = t.get_configuration_as_dict(name="filter") task_param = t.get_parameters() task_param['filter'] = conf_dict # this is to enable to forcefully update parameters post execution t.mark_started(force=True) # update hyper-parameters back t.set_parameters(task_param) # mark as completed back t.mark_completed(force=True)wdyt?

EDIT: I would first test on a single Task 😉

  
  
Posted one year ago

AgitatedDove14 Yes! That would be exactly what I want (i.e. get_configuration_as_dict .) Alas, no such thing exists in 1.4.1. Is that supposed to come in a next version?

CostlyOstrich36
{"meta":{"id":"3cceedbbc65d480096ebb02b5aba5902","trx":"3cceedbbc65d480096ebb02b5aba5902","endpoint":{"name":"tasks.get_configurations","requested_version":"2.17","actual_version":"1.0"},"result_code":200,"result_subcode":0,"result_msg":"OK","error_stack":"","error_data":{}},"data":{"configurations":[{"task":"9910bc0401804bb787312d39c3a251ff","configuration":[{"name":"filter","value":"inference = [{\n type = \"StreamFilter\"\n params {\n context = \"full\"\n op = \"or\"\n lower_bounds {\n key = 4\n mouse = 4\n }\n }\n }]\ntrain {\n users {\n op = \"and\"\n lower_bounds {\n min_sessions = 24\n }\n }\n}","type":"dictionary"}]}]}}

  
  
Posted one year ago

Hi WittyOwl57 ,
The function is :
task.get_configuration_object_as_dict ( name="name" )
with task being your Task object.

You could find a bunch of pretty similar functions in the docs. Have a look at here : https://clear.ml/docs/latest/docs/references/sdk/task#get_configuration_object_as_dict

  
  
Posted one year ago

Hi WittyOwl57 ,

Can you give a screenshot of how it's saved in the UI currently? Also can you look at the developer tools and see what tasks.get_configuration_names & tasks.get_configurations return when looking at the experiment's configurations in the UI

  
  
Posted one year ago

Hit F12 when on the browser 🙂

  
  
Posted one year ago

This is how a configuration item looks like:
<tasks.ConfigurationItem: { "name": "filter", "value": "inference = [{\n type = \"StreamFilter\"\n params {\n context = \"full\"\n op = \"or\"\n lower_bounds {\n key = 16\n mouse = 32\n }\n }\n }]\ntrain {\n users {\n op = \"and\"\n lower_bounds {\n min_sessions = 32\n }\n }\n}", "type": "dictionary" }>The value is a string that prints pretty but I'm not sure how to parse back. If it was a yaml string i would print as pretty or prettier, but I could also convert it back into a dict.

  
  
Posted one year ago

ah, I thought you meant something clearml specific.

  
  
Posted one year ago
524 Views
12 Answers
one year ago
one year ago
Tags