Laure Vancau
07/03/2024, 7:38 AMlocal_experiment_test_pipeline
the local_experiment
is set by the developper working on the project and the test_pipeline
should be added dynamically through the conf/env variables).
Context: I have several pipelines defined in a pipeline_registry
. For naming of artifacts/mlflow runs, I would like to make the name of the pipeline being run an environment variable that I can reference in the kedro project conf. How would you recommend making the pipeline name an environment variable?
thanks for your input ! ☀️
Explored strategies:
• I looked into the before_run Hook, however this gets called after the conf is set
• I looked into rewriting a run.py but I think maybe I need to touch on the cli.py to get the cli args. Exploring this atm
• Could a kedro plugin be the way to go?
Update: I can get the pipeline name as an environment variable now by saving it in cli.py following the template provided here (https://docs.kedro.org/en/0.18.14/development/commands_reference.html). This is an environment variable so I am trying to add it to the globals_dict in settings.py to be able to use it in conf. However, it seems cli.py gets called after the conf is initialized in settings.py. How can we dynamically set this variable then?? 🥲datajoely
07/03/2024, 12:29 PMdatajoely
07/03/2024, 12:29 PMLaure Vancau
07/03/2024, 12:36 PMdatajoely
07/03/2024, 12:37 PMLaure Vancau
07/03/2024, 1:05 PMmlflow_node_hook.after_context_created
mlflow_node_hook.before_pipeline_run
here: https://github.com/Galileo-Galilei/kedro-mlflow/blob/64b8e94e1dafa02d979e7753dab9b9dfd4d7341c/tests/framework/hooks/test_run_name.py#L19
so I will look into them 😊 but happy for any pointers tooLaure Vancau
07/03/2024, 1:14 PMdatajoely
07/03/2024, 1:15 PMdatajoely
07/03/2024, 1:15 PMdatajoely
07/03/2024, 1:15 PM0.18.14
without any breaking changes, so I’m not sure if it was added there or in 0.19.xLaure Vancau
07/03/2024, 1:19 PMdatajoely
07/03/2024, 1:26 PMYolan Honoré-Rougé
07/04/2024, 7:04 AMkedro
and kedro-mlflow
with the runtime_params
resolver but it's still frustrating because the resolver does not add by default the pipeline_name
and the env
value, you have to specify it manually through the CLI which is not ideal. I've though about opening a PR for a while.