In kedro viz can I control which hooks are run whe...
# questions
i
In kedro viz can I control which hooks are run when running
kedro viz build
? I have an
after_context_created
hook which persists certain information about the context, like parameters, etc so I can access them from elsewhere, particularly at pipeline registry.
m
I don't know the exact flow that's triggered when doing
kedro viz build
but if the KedroContext is set up as part of it I would think the hook is executed. @Rashida Kanchwala or @Ravi Kumar Pilla might know more details here.
r
We do have a way to skip the hooks i.e.
kedro viz run --ignore-plugins
but I think it's currently only available for
kedro viz run
command and not
kedro viz build
. Can i request u to raise this issue on our github page?
i
It's not that I want to skip some hooks, it seems that the
after_context_created
for a custom hook i registered in
settings.py:HOOKS
isn't being triggered when I run
kedro viz build
.
kedro viz run
works fine on the other hand
r
Thanks for raising this; i had a look at the code and you are right
kedro viz build
currently skips all the hooks. I am not sure why we do this by default. I think we should make it an option the users pass similar to
kedro viz run
. Can I ask you to raise a bug request and we will try to fix it soon.
i
absolutely, thanks for checking 🙂