alert-beach-72590
07/12/2024, 9:44 PME metaflow.decorators.DuplicateFlowDecoratorException: Flow already has a decorator 'named_env_base'. You can specify each decorator only once.
• I have two flows in the same directory (say flow_A
and flow_B
).
• Both use the same line @named_env_base(name="my_project:latest")
to set up the conda env for the flow.
• In each one of those files I also have a config data class.
• Outside of those files, I import those config classes and instantiate those configs to run some tests. When importing the config from flow_A
, all goes well. That is the flow that first had the @named_env_base(name="my_project:latest")
decorator. But when importing the config dataclass from flow_B
, I get the error at the start of this message.
◦ This is not about flow_B
itself: if I import first from flow_B
, the same error occurs when tryng to do the second import, now from flow_A
.
Is this intentional? _Are people not supposed to import two files containing flows with the same conda/named_env decorator?_ Why? If this is considered a bug, I'm happy to open an issue.
For now I think I'll move the configs out of the flow files, but I really liked having the configs and the flows in the same file.dry-beach-38304
07/13/2024, 1:53 AMdry-beach-38304
07/13/2024, 1:54 AMalert-beach-72590
07/16/2024, 3:06 PMmetaflow 2.12.2 pyhd8ed1ab_0 conda-forge
metaflow-netflixext 1.2.0 pyhd8ed1ab_0 conda-forge
I already did a workaround, but I'll see if I can reproduce the issue in 2.12.7.dry-beach-38304
07/16/2024, 4:37 PMalert-beach-72590
07/16/2024, 6:23 PM