few-dress-69520
09/15/2025, 11:11 AMenv_name to define the env a step should be executed with:
@named_env(
name="@{METAFLOW_INIT_ENV_NAME}",
fetch_at_exec=True,
)
If I understand the docs correctly, this is how it should be used.
Indeed, this does work fine locally and on AWS batch, presumably because it executes this code which assembles the necessary variables from the flow parameters.
But when I deploy it as a step-function it instead executes bootstrap_environment (in particular CondaEnvironment.sub_envvars_in_envname without the addl_env argument) which doesn't parse the flow parameters and thus fails with metaflow.metaflow_environment.InvalidEnvironmentException: Could not find 'METAFLOW_INIT_ENV_NAME' in the environment -- needed to resolve '@{METAFLOW_INIT_ENV_NAME}'
Is it possible to also include code like this in the bootstrap_environment function?dry-beach-38304
09/15/2025, 3:06 PMfew-dress-69520
10/24/2025, 12:39 PM--with kubernetes everything works as expected. But when it is executed as an argo-workflow it fails.
I would appreciate any guidance here.dry-beach-38304
10/26/2025, 6:51 AMMETAFLOW_INIT_ENV_NAME or something like that?dry-beach-38304
10/26/2025, 6:57 AMMETAFLOW_INIT_… but argo seems to be passing them with annotations.dry-beach-38304
10/26/2025, 6:57 AMfew-dress-69520
10/27/2025, 7:15 AMis it the same error with argo — as in, the missingYes, it's the same erroror something like that?METAFLOW_INIT_ENV_NAME
metaflow.metaflow_environment.InvalidEnvironmentException: Could not find 'METAFLOW_INIT_ENV_NAME' in the environment -- needed to resolve '@{METAFLOW_INIT_ENV_NAME}' . The error still originates here: https://github.com/Netflix/metaflow-nflx-extensions/blob/main/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py#L677 which is called from here: https://github.com/Netflix/metaflow-nflx-extensions/blob/main/metaflow_extensions/netflix_ext/plugins/conda/remote_bootstrap.py#L43. The parameter is not passed down to the sub_envvars_in_envname method and contrary to local execution it is also not stored in an environment variable.
I'm a bit unclear what you mean by
argo seems to be passing them with annotations
dry-beach-38304
10/27/2025, 8:15 AMMETAFLOW_INIT_ENV_NAME in your case) to pass parameter values which is why the approach in there works. In argo, it doesn’t seem that it is passed down with environment variables but with something else. I am getting a bit more detail (I didn’t write the argo part) and most likely I can write a small adapter that will read the parameter values from the right place.few-dress-69520
10/29/2025, 6:57 AMdry-beach-38304
10/29/2025, 9:03 AMfast-accountant-35989
11/18/2025, 10:58 AMdry-beach-38304
11/18/2025, 3:54 PMfast-accountant-35989
11/19/2025, 7:05 AMfew-dress-69520
11/26/2025, 10:11 AMfew-dress-69520
01/20/2026, 8:54 AMscript).
If, on the other hand this change should be contained to the netflix extensions package, then doesn't it have to be done similarly to here by accessing the datastore, retrieving the parameters and exposing them as environment variables for the individual steps that use fetch_at_exec. For that case I don't think I understand the system well enough to make the correct change.dry-beach-38304
01/20/2026, 5:45 PMthankful-ambulance-42457
01/20/2026, 7:01 PMthankful-ambulance-42457
01/20/2026, 10:58 PMfew-dress-69520
01/26/2026, 11:24 AM