Discover this year's submissions to the Dataiku Frontrunner Awards and give kudos to your favorite use cases and success stories!READ MORE

How to load MLFLOW registered model to Dataiku DSS

vaishnavi
Level 2
How to load MLFLOW registered model to Dataiku DSS

Before using Dataiku, I used to use MLFlow (Hosted on an EC2 instance) to register my models. Now I want to load those models to Dataiku DSS. 

I have read the below document as well to understand the process of importing mlflow models.

https://doc.dataiku.com/dss/latest/mlops/mlflow-models/importing.html

But I understood that models saved to MLFLow from Dataiku can only be loaded back to DSS.

mlflow_version = saved_model.import_mlflow_version_from_path("version_id", model_directory, 'code-environment-to-use')

In this line of code, the model_directory is the path of the mlflow registered model which is on other EC2 instance ? If yes,  I tried the same but it gives me below error

DataikuException: com.dataiku.dip.io.SocketBlockLinkKernelException: Could not run command READ_META: : <class 'FileNotFoundError'> : [Errno 2] No such file or directory:
'<dataiku-install-dir-name>/saved_models/<Project_Name>/<id>/versions/version_id/MLmodel'

 This the value I had provided to the model_directory attribute : https://<host-name>/mlflow/#/models/<model_name> 

0 Kudos
2 Replies
AurelienL
Dataiker
Dataiker

Hi @vaishnavi 

import_mlflow_version_from_path only works with filesystem paths, not URLs. So your model would have to be on the DSS filesystem to use that method.

An alternative would be to copy all your model files to a DSS managed folder and use import_mlflow_version_from_managed_folder.

0 Kudos
vaishnavi
Level 2
Author

@AurelienL But how do I copy the registered models from Mlflow instance to DSS ?

0 Kudos