Hello everyone, I’m facing a very specific problem...
# questions
t
Hello everyone, I’m facing a very specific problem with kedro-mlflow. I don’t know exactly if this is the right forum, so feel free to point me to the another one. I’m failing to load the champion version of a wrapper SklearnPipeline model registered in MLFlow. I want to save many experiments to MLFlow and to be able to load the champion version for other downstream pipelines. My catalog.yml looks like this:
Copy code
model:
 type: kedro_mlflow.io.models.MlflowModelTrackingDataset
 flavor: mlflow.sklearn
 save_args:
  registered_model_name:model

model_loader:
 type: kedro_mlflow.io.models.MlflowModelRegistryDataset
 flavor: mlflow.sklearn
 model_name: "model"
 alias: "champion"
If I try to load the model in a new kedro session, it will demand a run_id. If I try to use the model_loader. It will complain that the wrapper SklearnPipeline object don’t have a run_id, giving this error message:
Copy code
DatasetError: Failed while loading data from dataset MlflowModelRegistryDataset(alias=champion, 
flavor=mlflow.sklearn, model_name=model, 
model_uri=models:/model@champion, pyfunc_workflow=python_model).
'dict' object has no attribute 'run_id'
Does any one of you have any idea how I could load the champion model?
👀 1
r
hi, i tried replicating this at my end; and it worked fine. I am on kedro-mlflow==0.14.5; what version are you on
t
I just upgraded to 0.14.5 and I'm still getting this problem.
👀 1
r
Hi @Thiago Valejo, I will try to replicate on my end and update here my response. Thanks for your patience
y
(kedro-mlflow author's here) Hi, sorry for the bug. What version of kedro and Mlflow are you using? Are these 2 models called in the same pipeline execution or in 2 steps? Was the model saved a long time ago in another kedro version and reloaded recently?
It seems the metadata are different which is definitely a bug, your workflow seems correct. This may be a regression introduced recently for thread safety issues.
I can't replicate right now, I don't have a computer