stocky-electrician-3956
07/22/2024, 2:23 PM@trigger_on_end
to launch the next flow with out the manual intervention of a person, while still allowing us to manually trigger flows if needed, but the parameters are causing an issue. Is there a way to pass parameters when creating the template or some other way that doesn't cause the previous flow in the chain to have to know about all the down stream parameters?stocky-electrician-3956
07/22/2024, 2:25 PMshy-address-41011
07/22/2024, 2:46 PMshy-address-41011
07/22/2024, 2:46 PMshy-address-41011
07/22/2024, 2:49 PMstocky-electrician-3956
07/22/2024, 2:49 PMstocky-electrician-3956
07/22/2024, 2:49 PMshy-address-41011
07/22/2024, 2:57 PMstocky-electrician-3956
07/22/2024, 2:59 PMstocky-electrician-3956
07/22/2024, 3:00 PMshy-address-41011
07/22/2024, 3:01 PMstocky-electrician-3956
07/22/2024, 3:03 PMshy-address-41011
07/22/2024, 3:03 PMself
and then access them downstream
https://docs.metaflow.org/production/event-triggering/flow-events
When using @trigger_on_finish, you can access information about the triggering runs through current.trigger.run or current.trigger.runs in the case of multiple flows, which return one or more Run objects. Use the Run object to access artifacts as you do when using the Client API directly.
shy-address-41011
07/22/2024, 3:06 PMstocky-electrician-3956
07/22/2024, 3:08 PMstocky-electrician-3956
07/23/2024, 6:07 AMdef env_var_parameter( default: str = None):
def get_env_var(context):
return os.getenv(context.parameter_name, default)
return get_env_var
doc_folder_root = Parameter(
"doc-folder-root",
help="The docs folder to write the report to",
default=env_var_parameter("UID_HERE"),
)
Then modified our metaflow launch script to create the environment variables if its a deploy and they are provided.