i’m setting the environment variable in the python script like thisos.environ['CLEARML_CONFIG_FILE'] = str(Path.home()/f"clearml-{socket.getfqdn()}.conf")
then task.init
Hi PompousHawk82 ,
Did the clearml-iris.conf
file got created?
It only works that we set the CLEARML_CONFIG_FILE before script running
before i renamed it, i can log the experiment successfully, i basically add task.init to the python script then just run that script
But are you trying to run the task remotely using the agent?
i tried to add environment right before importing clearml, but it doesn’t work as expectedos.environ['CLEARML_CONFIG_FILE'] = str(Path.home()/f"clearml-{socket.getfqdn()}.conf") from clearml import Task Task.init(project_name="Alfred", task_name="finalized", auto_connect_frameworks={'pytorch': False})
when i run this one clearml-agent --config-file ~/clearml-iris.conf
it output the help info
To make ClearML SDK load an alternative config file, you need to set the environment variable CLEARML_CONFIG_FILE=<path-to-config-file>
What you're missing, is that the ClearML Agent --config-file
switch only tells the ClearML Agent which config file to use, but it won't affect any task running locally with ClearML SDK (only tasks executed by the ClearML Agent with the --config-file
switch)
Well, theoretically it should work if you set it before importing clearml, but it seems strange to do that in code - what's your use-case?
i’m not sure if i use the command correctly
i was trying to copy the content of that file
i just tried, but is still open result on public server.
i only want to use clearml agent to change the conf file
but basically i create it by init and rename it
then i run the second one, it basically outputs the same as just init