Skip to content

Kedro hooks do not work inside packaged pipeline for serving #404

Open
@Lasica

Description

@Lasica

Description

When I package a kedro pipeline for serving with modelify my kedro hooks no longer work.

Context

I was using hooks for initialization of some structures and had to make workarounds because hooks are not called. I'd like for hooks "before_pipeline_run" or "after_catalog_creation" to be called once when the server starts serving.
https://kedro.readthedocs.io/en/stable/hooks/introduction.html

Steps to Reproduce

  1. Make a pipeline with hooks
  2. use kedro mlflow modelify ... to package it for serving
  3. start serving with mlflow models serve ...
  4. observe that hooks are not run

I may publish minimal example code later to check it out.

Expected Result

Hooks should run.

Actual Result

They do not.
Tell us what happens instead.

Your Environment

Include as many relevant details about the environment in which you experienced the bug:

  • kedro and kedro-mlflow version used (pip show kedro and pip show kedro-mlflow): 0.18.4, 0.11.7
  • Python version used (python -V): 3.10.9
  • Operating system and version: archlinux 64bit

Does the bug also happen with the last version on master?

Yes.

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Projects

Status

📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions