Does anyone have a workflow for dynamic parameters...
# beginners-need-help
w
Does anyone have a workflow for dynamic parameters in production? I have a user trying to dynamically change a parameter to be 1 year ago in production. Is this the job of the orchestration tool above kedro? Does kedro have a better mechanism for dynamic parameters?
Does it make sense to do this in a gook, or is that over complicating it.
a
We previously used
registered_config_loader
hook to update parameters at run_time. I'm not sure how something similar could be achieved since 0.18.0 though. Example below updates experiment_name at runtime.
Copy code
@hook_impl
    def register_config_loader(
        self, conf_paths: Iterable[str], env: str, extra_params: Dict[str, Any]
    ) -> ConfigLoader:

        globals_dict = {}
        if extra_params:
            globals_dict = {"experiment_name": extra_params["experiment_name"]}
        return TemplatedConfigLoader(
            conf_paths,
            globals_pattern="*globals.yml",
            globals_dict=globals_dict,
        )
3 Views