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
DepressedChimpanzee34 , how are you trying to get the remote config values? Also, what which configurations are we talking about specifically?
not really.. did my previous comment made sense to you?
SuccessfulKoala55 .. so no ideas how to proceed?
@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?
TimelyPenguin76 , I generate it manually , clone some task -> adjust config -> enqueue
then when the agent pulls it I get the following behaviorremote_dict = task.connect(local_dict) # matching keys are overridden from remote config
which I can't reproduce as I described above
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
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)
parameters = { 'float': 2.2, 'string': 'my string', }
for example.. can be anything really, some dictionary
Can you give an example for your test_config
?
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)
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?
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
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?
DepressedChimpanzee34 , and you're having problems at step 4 when you're trying to to override the connected configurations. Am I understanding you correctly?
DepressedChimpanzee34 , I think I understand you, however the method eludes me. Can you please provide a snippet of what you're trying to do?
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
DepressedChimpanzee34 you can try naming the connected configuration differently. Let me see if there is some other more elegant solution 🙂
SuccessfulKoala55 , yes, that part is 100% correct
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
and this is how I get the new hyper parameters for the new run
it is still relevant if you have any ideas
I am trying to mimic that for debug
CostlyOstrich36 , I don't think we are talking about the same things..
but I don't get the same when I try to reproduce it for debug as described above (with task.connect)