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
I Have A Question Regarding "Imitating" An Agent Pulling Some Task For Debugging Purposes I Am Trying To Do Something Like: Creating A Task On The Server

I have a question regarding "imitating" an agent pulling some task for debugging purposes
I am trying to do something like: Creating a task on the server
task = Task.get_task(task_id='0b906d0271884caeb55b6e1e089eac2f') task.running_locally() connected_dict = task.connect(test_config)but I can see that I'm not getting the remote config values.. what am I doing wrong?

  
  
Posted 3 years ago
Votes Newest

Answers 28


Hi RipeGoose2 , you can use this before calling Task.init() :
Task.debug_simulate_remote_task(<task_id_here>)This will simulate running the task remotely, as I think you're looking for

  
  
Posted 3 years ago

SuccessfulKoala55 .. so no ideas how to proceed?

  
  
Posted 3 years ago

SuccessfulKoala55 , yes, that part is 100% correct

  
  
Posted 3 years ago

DepressedChimpanzee34 let's see if I got it 🙂 - are you trying to mimic the way an agent will run your task by running it locally on your development machine?

  
  
Posted 3 years ago

thoughts?

  
  
Posted 3 years ago

FrothyDog40 , I am getting the feeling that either I am abusing the framework int the way that I use it, or I am doing a poor jot at explaining myself

  
  
Posted 3 years ago

TimelyPenguin76 , I generate it manually , clone some task -> adjust config -> enqueue
then when the agent pulls it I get the following behavior
remote_dict = task.connect(local_dict) # matching keys are overridden from remote configwhich I can't reproduce as I described above

  
  
Posted 3 years ago

DepressedChimpanzee34 how do you generate the task thats running remotely? once the agent pulled the task, this is your running configuration (it will pull the same configuration from the server as you see in the UI)

  
  
Posted 3 years ago

@Alex Finkelshtein, if the parameters you're using are like this:

parameters = { 'float': 2.2, 'string': 'my string', }
Then you can update the parameters as mentioned before:
parameters = { 'float': 2.2, 'string': 'my string', } parameters = task.connect(parameters) parameters['new_param'] = 'this is new' parameters['float'] = '9.9'
Please note that parameters['float'] = '9.9' will update the parameter specifically. I don't think you can update the parameter en masse so you would need some sort of loop to update each parameter individually. So if to continue the example you gave:

task = Task.get_task(task_id='<TASK_ID>') task.running_locally() parameters = { 'float': 2.2, 'string': 'my string', } parameters = task.connect(parameters) parameters['float'] = '9.9'
Does this help?

  
  
Posted 3 years ago

it is still relevant if you have any ideas

  
  
Posted 3 years ago

thoughts?

  
  
Posted 3 years ago

parameters = { 'float': 2.2, 'string': 'my string', }for example.. can be anything really, some dictionary

  
  
Posted 3 years ago

Can you give an example for your test_config ?

  
  
Posted 3 years ago

but I don't get the same when I try to reproduce it for debug as described above (with task.connect)

  
  
Posted 3 years ago

for keys that are present in both the remote and local configuration the expected behavior is that the remote overrides the local, that what happens in my agent runs

  
  
Posted 3 years ago

DepressedChimpanzee34 , and you're having problems at step 4 when you're trying to to override the connected configurations. Am I understanding you correctly?

  
  
Posted 3 years ago

I am trying to mimic that for debug

  
  
Posted 3 years ago

and this is how I get the new hyper parameters for the new run

  
  
Posted 3 years ago

in 4. I am using the task.connect

  
  
Posted 3 years ago

I have the following flow:
create a task draft on clearml UI Enqueue it agent picks up the task Agent synchronizes (some custom mechanism I have) the hyper parameters of the experiment with some local config object Agent runs task

  
  
Posted 3 years ago

DepressedChimpanzee34 , I think I understand you, however the method eludes me. Can you please provide a snippet of what you're trying to do?

  
  
Posted 3 years ago

not really.. did my previous comment made sense to you?

  
  
Posted 3 years ago

DepressedChimpanzee34 , the only way I see currently is to update manually each parameter

For example:
parameters = { 'float': 2.2, 'string': 'my string', } parameters = task.connect(parameters) parameters['new_param'] = 'this is new' parameters['float'] = '9.9'
Does this help?

  
  
Posted 3 years ago

I am trying to mimic an agent pulling a task, and while running it syncing some custom configuration dict I have according to the task configuration (overriding the defaults)

  
  
Posted 3 years ago

CostlyOstrich36 , I don't think we are talking about the same things..

  
  
Posted 3 years ago

DepressedChimpanzee34 you can try naming the connected configuration differently. Let me see if there is some other more elegant solution 🙂

  
  
Posted 3 years ago

CostlyOstrich36 , I am trying to get the config values as in the example:
task.connect(test_config)I expect that the returned connected dict will override existing keys the local dict with matching keys from the remote task dict
the config I'm talking about is the General section in the Hyper-Parameters under the configuration tab

  
  
Posted 3 years ago

DepressedChimpanzee34 , how are you trying to get the remote config values? Also, what which configurations are we talking about specifically?

  
  
Posted 3 years ago
1K Views
28 Answers
3 years ago
one year ago
Tags