i only want to use clearml agent to change the conf file
i was trying to copy the content of that file
when i run this one clearml-agent --config-file ~/clearml-iris.conf
it output the help info
then i run the second one, it basically outputs the same as just init
i’m not sure if i use the command correctly
i just tried, but is still open result on public server.
Hi PompousHawk82 ,
Did the clearml-iris.conf
file got created?
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?
but basically i create it by init and rename it
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})
It only works that we set the CLEARML_CONFIG_FILE before script running
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
before i renamed it, i can log the experiment successfully, i basically add task.init to the python script then just run that script
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)
To make ClearML SDK load an alternative config file, you need to set the environment variable CLEARML_CONFIG_FILE=<path-to-config-file>
But are you trying to run the task remotely using the agent?