fast-advantage-42097
03/06/2025, 6:33 PMConfig
and Step Function
generation. The goal is to be able to change the Config for a Flow dynamically based on the input to the Step Function State Machine.
I've noticed that when I define a Config
on a flow, it ends up generating an environment configuration (METAFLOW_FLOW_CONFIG_VALUE
) for the Step Function. I'm struggling to understand how the generated , kv.
-prefixed entry is meant to be used. If I try to invoke a run
on the flow with METAFLOW_FLOW_CONFIG_VALUE
in-lined, I run into
Could not load expected configuration values from the CONFIG_PARAMETERS file. This is a Metaflow bug. Please contact support.
I've tried tracing and debugging the code around this but as far as I can tell this is hardcoded based on user_configs.config_parameters.CONFIG_FILE
.
Would anyone be able to provide an example of how Config
is meant to be used in relation to Step Functions? Thank you!dry-beach-38304
03/06/2025, 6:43 PMfast-advantage-42097
03/06/2025, 6:46 PMIf you mean that configs should change for each instance of the sfn graph then that is not what configs are forah ok thank you for clarifying this. So the premise is that for a given SFN that gets deployed. The resources for a given SFN are expected to be statically declared at creation-time then?
dry-beach-38304
03/06/2025, 6:48 PMfast-advantage-42097
03/06/2025, 6:50 PMdry-beach-38304
03/06/2025, 6:57 PMfast-advantage-42097
03/06/2025, 6:58 PMfast-advantage-42097
03/07/2025, 3:47 PMConfig
in Step Functions? 1 thing that I was confused by was how the codegen-ed METAFLOW_FLOW_CONFIG_VALUE
(with the kv.
prefixed entries, was supposed to be used. I understood how to use --config
when running from CLIdry-beach-38304
03/07/2025, 5:48 PMmyflow.py --config <config-file> step-functions create
or myflow.py --config-value <inline string of the config value> step-functions create
. Internally, when we then run on a remote machine, we pass a special value to config (the famous kv.
which tells metaflow: “the value of this config is actually stored in some meta data file you have in your code package — go read from there).