Is there a way to change hooks dynamically in Kedro?

216 views Asked by At

I know I can add any CLI option via kedro_cli.py. but I can't find out how to change what hooks are loaded dynamically.

I'm using kedro-mlflow, which features are provided via hooks. And sometimes I don't want to log MLFlow temporarily.

If it's possible, please show me an example of ProjectContext code.

1

There are 1 answers

0
921kiyo On

If the hooks have an entry-point as described in https://kedro.readthedocs.io/en/stable/07_extend_kedro/05_plugins.html#hooks , you would be able to disable it by specifying in .kedro.yml https://kedro.readthedocs.io/en/stable/07_extend_kedro/04_hooks.html#disable-auto-registered-plugins-hooks but you might have to ask the maintainer of kedro-mlflow plugin to add auto-registration first.