RoundMosquito25 you might need to use cast=True
when you get the parameters.
See this snippet:
` from clearml import Task
t = Task.init()
params = {}
params["Function"] = {}
params["Function"]["number"] = 123
t.set_parameters_as_dict(params)
t.close()
cloned = Task.clone(t.id)
s = cloned.get_parameters_as_dict(cast=True)
s["Function"]["number"] = 321
cloned.set_parameters_as_dict(s)
print(type(cloned.get_parameters_as_dict(cast=True)["Function"]["number"])) # will print 'int' `
So seems like this dictionary works with strings
After you do s['Function']['random_number'] = random.random()
you still need to call set_parameters_as_dict(s)
version 1.8.1
No, there are no error messages. The behaviour is just very strange (or even incorrect)
Suppose that this is a task that is cloned:base_task = replacement_task.create_function_task( func=some_func, # type: Callable func_name=f'func_id_run_me_remotely_nr', # type:Optional[str] task_name=f'a func task', # type:Optional[str] # everything below will be passed directly to our function as arguments some_argument=message, some_argument_2=message, random_number=2 )
When in the code above I do for examples['Function']['random_number'] = random.random()
Then in some_func
argument random_number
is 2 (instead of random number).
When I pass a string, then in some_func
I'll parse it to float again - it works
Hi RoundMosquito25 ! What clearml version are you using? Do you get any error messages when you are setting floats instead of strings?