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

Afaque Ahmad

05/23/2023, 9:12 AM
Hi Kedro Folks I have 2 hooks, one is
PipelineHooks
and
MLFlowHooks
and both have
before_pipeline_run
. I need the hook
before_pipeline_run
defined in
PipelineHooks
to run before the one in
MLFlowHooks
. I've specified this order below in
settings.py
, but it doens't work:
Copy code
HOOKS = (
    PipelineHooks(),
    MLFlowHooks(),
)
Is there any way to keep an order of execution?
👀 1
j

Juan Luis

05/23/2023, 9:32 AM
Do you control the implementation of both? Or does one come from a plug-in?
a

Afaque Ahmad

05/23/2023, 9:56 AM
I control the implementation of both.
d

Deepyaman Datta

05/23/2023, 1:27 PM
Flip the order. 🙂
j

Juan Luis

05/23/2023, 10:16 PM
I just made a test locally and indeed, reversing the tuple works 👍🏼 @Afaque Ahmad let us know if that solves your need
a

Afaque Ahmad

05/24/2023, 2:02 AM
Thanks so much @Deepyaman Datta @Juan Luis!