Hi UnevenDolphin73
I cannot initialize a task before loading the file, but the docs for
connect_configuration
Yes, that's basically the problem. you have to decide where is the main driver.
If you are executing the code "manually" (i.e. not via the agent) then there is no problem, obviously you have the local file and you can use it to load the "project name" etc, then you just call Task.connect_configuration to log the content.
If you are running the same code via the agent, then by definition you are controlling the project and Task name from ClearML, Not the configuration file (remeber that you are creating the Task before you are running it), in that case you code will gracefully fail to load the conf file before callign Task.init but will find after the connect_configuration call, something like:
` try:
open conf file and read it
conf = read_file("my_local_file.json")
except:
conf = {}
task = Task.init(project_name=conf.get("project_name"), ...)
this will Always work, if running locally it will return the same as the local configuration, and if running remotely it will return a path to a a local file containing the exact content as the original conf file.
my_awlays_valid_conf_file = task.connect_configuration("my_local_file.json")
reload configuration, by now we have everything no matter what
conf = read_file(my_awlays_valid_conf_file) `