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, I Want To Simultaneously Initialize A Task (From A Python Script) And Enqueue It To A Remote Machine With A Clearml Agent. However, I Didn'T Find How To Do It Yet. What I Tried:

Hi,

I want to simultaneously initialize a task (from a Python script) and enqueue it to a remote machine with a ClearML Agent. However, I didn't find how to do it yet. What I tried:

Using Task.init() + manual modifications: It does create the task with all the "automagical" parts (setting script path, uploading uncommitted changes etc.), however, it also automatically runs it on the local machine (and I don't want it) and I need to manually reset it and enqueue it to the desired machine. Using Task.create(): Should work in theory, but all the "automagical" part is gone: I need to configure everything manually, including uploading uncommitted changes by myself (yikes.). Using Task.clone() to clone a base task, modify it and enqueue the cloned task: Would've been a good choice. However, cloning doesn't update uncommitted changes and I want it to.
What's the best way to do it?

  
  
Posted one year ago
Votes Newest

Answers 6


That's the problem. ClearML has to detect the uncommitted changes somehow. This is done while the code itself is running or when running with execute_remotely() . Otherwise, someone has to do a git diff and push it into the task object(database)

  
  
Posted one year ago

Thought about it, but this is a thing I don't want to do manually.

  
  
Posted one year ago

Hi DullPeacock33 , I think what you're looking for is this:
https://clear.ml/docs/latest/docs/references/sdk/task#execute_remotely
This will initialize all the automagical stuff but won't require running the script locally.
What do you think?

  
  
Posted one year ago

DullPeacock33 , this is because you want the uncommitted changes attached to the task. Technically speaking you can do something like this yourself. A task's uncommitted changes are editable when it is in draft mode. So you could add the uncommitted changes via api or maybe even SDK.

  
  
Posted one year ago

Welp, that seems to work!
However, the idea of executing the same script locally for creating a task and then executing it remotely feels a bit unintuitive.

  
  
Posted one year ago

I know.
Despite that, the execute_remotely() solution is good enough for me. Thanks!

  
  
Posted one year ago