-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook doesn't allow configuration updates at runtime #395
Comments
Hi, thank you very much for your suggestion! The idea looks cool, but I have a bunch of questions / remarks :
I think that the recommended way to change the experiment is to use a different environment with a dedicated I'd be glad to help you if you want to open a PR! |
Hi @Galileo-Galilei. I agree writing it along every command line would be tedious, but in production scenarios this is carried out by some orchestrator anyway. Regarding your last comment with I suggest we move along with a modified version of your suggestion where the user may have certain settings parsed at runtime by using template strings and environment variables. Example: ´experiment: "prefix-${MLFLOW_ENV_1}_${MLFLOW_ENV_2}-suffix"` Benefits would be high flexability and high compatabilityt with orchestration tools (ENVs works everywhere). What do you think? Happy to write the PR if you guide me where you want the code to be located. |
Hi @kasperjanehag, I understand your issue about multiple combination of Environment variables are already supported...The good news is that what you suggest (combining fixed string and templated environment variables) is already possible: # settings.py
from kedro.config import TemplatedConfigLoader # new import
import os # new import
CONFIG_LOADER_CLASS = TemplatedConfigLoader
CONFIG_LOADER_ARGS = {
"globals_dict": os.environ,
}
} and your above example will work automatically. Even better, I think this will become the default in ... but runtime CLI params are notThe bad news is that if you also want to use the pipeline name as in the original question (e.g. use something like That said, it is unlikely they release the feature soon so I may support this at the
global_dict with the run_params arguments of before_pipeline run. However this is tricky because the 2 hooks need to interact and I'd like to avoid that if possible.
|
This feature will likely wait the implementation of this issue on kedro's side: kedro-org/kedro#2866 |
For the record, this is now possible with the |
Description
In large kedro projects where you have multiple different pipelines working in sequence / paralell you may want to override certain
kedro-mlflow
settings liketracking.experiment.name
during runtime. For example you may want to do something liketo make sure that
pipeline_1
results are tracked and stored to the right experiment name. The current implementation ofMlflowHook
, which looks something like thisdoesn't provide any other way to set the experiment name except for keeping one individual kedro configuraiton per pipeline.
Possible Implementation
I suggest, and can support in implementing, that a method call is added right before
where the mlflow_config object is updated based on all parameters starting with "mlflow" from context.params.
Any ideas?
The text was updated successfully, but these errors were encountered: