-
Notifications
You must be signed in to change notification settings - Fork 910
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
Enable/Disable hook with runtime config #1935
Comments
You can disable installed hooks via # settings.py
# DISABLE_HOOKS_FOR_PLUGINS = ("kedro-viz",)` Or are you specifically requesting this for the Kedro CLI? |
I would want to adjust project source code only if that's a change that should be version controlled down the line (on project level), and leave all single-run-related config to Kedro CLI and yaml run configs. |
I assume this is similar to [Allow extra hooks to be passed via the Kedro CLI, update the title slightly. Quick question: |
Correct. The best combo though, would be a CLI parameter + env variable. In the ideal world that would work like so: kedro run --with-profiling where |
Added some relevant notes from Discord today.
|
@foxale I think supporting arbitrary CLI arguments in the official Kedro CLI is unlikely. To achieve that, you can actually override Kedro CLI in your project easily. The I think you can achieve this by doing the following
See an example here: |
Awesome. And my assumption is you can implement such changes to CLI via kedro plugins as well? |
@foxale You could also point |
I'm closing this issue since there hasn't been any recent activity. Feel free to re-open this if you're still facing problems! |
Description
It may be useful to turn off certain hooks for specific kedro runs.
Context
Let's say I have a hook, that when
kedro run
is invoked, automatically profiles all outputs for me and stores HTML reports somewhere in the project dir. Of course, this is time consuming and I don't want to do have this feature enabled on each run but on demand. What's the best way to turn in on and off?Possible Implementation / Alternatives
Should I use
--params
and implement some switch on the hook side? Or maybe we should have a way to just decide which hooks to activate per run?Inspired by #435
The text was updated successfully, but these errors were encountered: