Galileo-Galilei / kedro-mlflow

A kedro-plugin for integration of mlflow capabilities inside kedro projects (especially machine learning model versioning and packaging)
https://kedro-mlflow.readthedocs.io/
Apache License 2.0
193 stars 29 forks source link

Add auto registration of model artifacts #550

Open mck-star-yar opened 1 month ago

mck-star-yar commented 1 month ago

Description

As a user I'd like to have an option to automatically register the model in mlflow, specifically PipelineML.

Context

The current workflow of model development is DS runs pipeline -> inference part gets captured by Mlflow -> manual registration of the model in the model registry -> inference pipeline uses latest model from model registry. We'd like to make the manual process automatic.

Possible Implementation

When defining the inference pipeline via pipeline_ml_factory, users can specify if they'd like this pipeline to be auto-registered in the model registry and the name of the model. Then we store that as an attribute in the PipelineML. And then hook will check this attribute and register the requested models.

The same can be done for the models defined via catalog – an extra parameter for registering the model and the name.

mck-star-yar commented 1 month ago

After researching this issue I came to understanding that this can be done by utilizing log_model_kwargs by passing registered_model_name to it.

Probably something worth mentioning in the docs 🤷‍♂️

Galileo-Galilei commented 1 month ago

Yes I was going to suggest to use log_model_kwargs but I did not remembered the exact settings, glad you find it by yourself. I reopen the issue to add it to the documentation.