worried-flag-22881
10/15/2021, 10:23 PMmetaflow/package.py
(code):
# the user's working directory
flowdir = os.path.dirname(os.path.abspath(sys.argv[0])) + '/'
for path_tuple in self._walk(flowdir):
yield path_tuple
What I’m trying to do is to allow the script to import modules in parent directories during a metaflow run.
For example, if I have the following modules, and want to run metaflow with metaflow_flows/my_flow.py
transformations/
summation.py
metaflow_flows/
my_flow.py
I’d like to be able to be able to write from transformations import summation
inside my_flow.py
straight-shampoo-11124
10/16/2021, 12:40 AMmy_flow.py
needs to be at the root.
If you want to keep the file under metaflow_flows
, you can create a symlink like this
transformations/
summation.py
metaflow_flows/
my_flow.py
my_flow.py -> metaflow_flows/my_flow.py