https://kedro.org/ logo
#questions
Title
# questions
i

Iñigo Hidalgo

03/13/2024, 8:50 PM
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

Merel

03/14/2024, 9:43 AM
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

Rashida Kanchwala

03/14/2024, 9:55 AM
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

Iñigo Hidalgo

03/14/2024, 10:27 AM
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

Rashida Kanchwala

03/14/2024, 10:48 AM
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

Iñigo Hidalgo

03/14/2024, 10:49 AM
absolutely, thanks for checking 🙂
3 Views