Mike Davison
11/24/2021, 8:35 PMmy_job
is configured in workspace.yaml to run in WorkingDirectoryB with VirtualEnvB
• my_job
runs an op which executes some_module.some_method
in parallel via multiprocessing.Pool
• some_module
is in WorkingDirectoryB/some_module.py (no package)
Actual behaviour:
• dagit or dagster looks for some_module
in WorkingDirectoryA and VirtualEnvA
◦ when WorkingDirectoryA == WorkingDirectoryB, everything is great
◦ when WorkingDirectoryA != WorkingDirectoryB, we fail to find some_module
w/`ModuleNotFoundError`
Desired behaviour:
• dagit or dagster looks for some_module
in WorkingDirectoryB and VirtualEnvB
• dagit or dagster does not look for some_module
in WorkingDirectoryA and VirtualEnvA
Is there a way to get the desired above behaviour to happen? I'll reply to this with some code to illustrate.Stefan Adelbert
11/25/2021, 6:51 AMdagster.yaml
, something like this
python_logs:
dagster_handler_config:
handlers:
myHandler:
(): my_logging.Handler
level: DEBUG
formatter: myFormatter
formatters:
myFormatter:
(): my_logging.Formatter
When the run launched on the run worker it was trying to import my_logging
, but couldn't (ModuleNotFoundError
) even though the my_logging
module was actually there.
I resolved this by installing my_logging
as a python package in the docker image used for the run worker.
I know this doesn't actually answer your question. I'd been keen to hear what you find out about this.Mike Davison
11/25/2021, 8:25 PMStefan Adelbert
11/28/2021, 11:24 PM