The script is intended to be executed remotely.
Can I declare an absolute path in this case?
CostlyOstrich36
Is that command evaluated prior to the task creation?
Or only after the task is executed remotely?
My question is what should be the path to the requirements.txt file?
Is it relative to the repo base?
This is actually in runtime (i.e. when running the code), so relative to the working directory. Make sense ? (you can specify absolute path, probably something I would avoid in the code base though...)
Why do you have this part? isn’t it the same code, the script entry point is auto detected ?
Because I don’t always run the script locally from it’s directory and I have additional modules in the same directory that I import.
Sure this will work
I’ll make sure to update it
task.set_script(working_dir=dir, entry_point="my_script.py")
Why do you have this part? isn't it the same code, the script entry point is auto detected ?
... or when I run my_script.py locally (in order to create and enqueue the task)?
the latter, When the script is running locally
So something like
os.path.join(os.path.dirname(file), "requirements.txt")
is the right way?
Sure this will work 🙂
This is actually in runtime (i.e. when running the code),
My script looks like that
` import clearml
clearml.Task.force_requirements_env_freeze(force=False, requirements_file="requirements.txt")
task = clearml.Task.init(...)
task.set_script(working_dir=dir, entry_point="my_script.py")
task.execute_remotely(queue_name='default')
rest of script goes here.... `When you refer to runtime, do you mean when the script is executed remotely, or when I run my_script.py locally (in order to create and enqueue the task)?
so relative to the working directory
So something like os.path.join(os.path.dirname(__file__), "requirements.txt")
is the right way? (assuming the script and the requirements file are at the same directory)
I think if you provide an absolute path it should work 🙂
Hi CrookedWalrus33 , do you have an ability to provide an absolute path?