In the meantime, any suggestion on how to set the working_dir in any other way? We are moving to this new code structure and I’d like to have clearml up and running
This would work to load the local modules, but I’m also using poetry and the pyproject.toml
is in the subdirectory, so the agent won’t install any dependency if I don’t set the work_dir
Hi @<1523701205467926528:profile|AgitatedDove14> , in my case all the code is in a subfolder, like projects/main
, so if I run from the git root it can’t find the local modules
Is there any other way to specify it besides directly in the component?
Oh nice thanks, will try with that combination
Hi @<1570220858075516928:profile|SlipperySheep79>
Is there a way to specify the working dir from the decoratoe
not directly, but why would that change anything? I mean the coponent code will be created in the git root, and you can still access files inside the subfolders
from .subfolder import something
what am I missing?
Hmm yes, @<1570220858075516928:profile|SlipperySheep79> I think you are right in your case it make sense to do add this option.
Could you add GH issue with the feature request? it should be fairly easy to add and we use GH to make sure we track those requests
wdyt?
Okay this is a bit hacky but will work
@PipelineDecorator.component(...)
def step(...)
import sys
import os
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), "projects", "main" ))
from file import something
This would work to load the local modules, but I’m also using poetry and the
pyproject.toml
is in the subdirectory, so the agent won’t install any dependency if I don’t set the
work_dir
hmmm true, in terms of requirements, you can list them in the decorator (see packages
argument)