Hi Team, Is there a way to not run certain kedro ...
# questions
a
Hi Team, Is there a way to not run certain kedro hooks when kedro viz loads? I have a spark hook defined which runs everytime I run kedro viz which I want to disable. Thanks! πŸ™‚
K 1
h
Someone will reply to you shortly. In the meantime, we've found some posts that could help answer your question.
a
This Hall app is crazy eager to find similar slack posts (but totally misses the point of my post)
πŸ‘ 1
πŸ˜• 2
d
which version of Kedro Viz are you running?
also
kedro viz --lite
may be what you're looking for
πŸ₯³ 1
a
Copy code
kedro-viz                          10.0.0
ah maybe it's this, I think this would work:
Copy code
DISABLE_HOOKS_FOR_PLUGINS = ("kedro-viz",)
But doesn't give me the flexibility to disable a particular hook though I think
d
does
kedro viz --lite
not work for your purposes?
a
Yes, I think it does the job too. Thanks for this option πŸ™‚
d
πŸ’ͺ
I love this new feature because it also doesn't require you to have any dependencies installed
it just looks at the pipeline code at an AST level and builds the graph
a
Wow, this would be super helpful! So I can technically run it from any environment, which is great!
Just need kedro and kedro viz installed?
πŸ‘Œ 2
r
Btw, which Kedro-version are you on because on version from Kedro-viz 9.0.0 , hooks are not called by default and you need to do
kedro viz --include-hooks
to actually run kedro-viz with hooks
i just saw ur message above. that' is weird 😐
a
kedro 18 😞 On some projects I am on kedro 19, on others it is kedro 18 still haha
βœ”οΈ 1
r
@Ravi Kumar Pilla - FYI
r
As Rashida mentioned from kedro viz 9.0.0 we ignore hooks by default unless you run
kedro viz --include-hooks
. I would like to know if you are registering the SparkHook similar to the doc here ? If you are still bumping into the issue, would you be happy to open an issue here with required information to reproduce.
a
Ah I just realised, the spark session initialization is part of
ProjectContext
in our case, so no way to disable it unless I refactor it to a hook That's why I was perplexed as to why my spark session is being initialized even though I disabled all the hooks πŸ˜…
d
Okay - but
β€”lite
solves your problem either way