The MLflow integration for DataRobot is a preview feature. Contact your DataRobot representative or administrator for information on using this feature.
The MLflow integration for DataRobot allows you to export a model from MLflow and import it into the DataRobot Model Registry, creating key values from the training parameters, metrics, tags, and artifacts in the MLflow model.
The MLflow integration for DataRobot requires the following:
Python >= 3.9
DataRobot >= 9.0
This integration library uses a preview API endpoint; the DataRobot user associated with your API token must have Owner or User permissions for the DataRobot model package.
Defines the MLflow model name; for example, "cost-model".
--mlflow-model-version
Defines the MLflow model version; for example, "2".
--dr-url
Provides the main URL of DataRobot instance; for example, https://app.datarobot.com.
--dr-model
Defines the ID of the registered model for key value upload; for example, 64227b4bf82db411c90c3209.
--prefix
Provides a string to prepend to the names of all key values imported to DataRobot. The default value is empty.
--debug
Sets the Python logging level to logging.DEBUG. The default level is logging.WARNING.
--verbose
Prints information to stdout during the following processes:
Retrieving model from MLflow: prints model information.
Setting model data in DataRobot: prints each key value added to DataRobot.
--with-artifacts
Downloads MLflow model artifacts to /tmp/model.
--service-provider-type
Defines the service provider for validate-auth. The supported value is azure-databricks for Databricks MLflow in Azure.
--auth-type
Defines the authentication type for validate-auth. The supported value is azure-service-principal for Azure Service Principal.
--action
Defines the operation you want the MLflow integration for DataRobot to perform.
The following command line operations are available for the --action option:
Action
Description
sync
Imports parameters, tags, metrics, and artifacts from an MLflow model into a DataRobot model package as key values. This action requires --mlflow-url, --mlflow-model, --mlflow-model-version, --dr-url, and --dr-model.
list-mlflow-keys
Lists parameters, tags, metrics, and artifacts in an MLflow model. This action requires --mlflow-url, --mlflow-model, and --mlflow-model-version.
validate-auth
Validates the Azure AD Service Principal credentials for troubleshooting purposes. This action requires --auth-type and --service-provider-type.
Run the sync action to import a model from MLflow into DataRobot¶
You can use the command line options and actions defined above to export MLflow model information from MLflow and import it into the DataRobot Model Registry:
After you run this command successfully, you can see MLflow information on the Key Values tab of a Registered Model version:
In addition, in the Activity log of the Key Values tab, you can view a record of the key value creation events:
Troubleshoot Azure AD Service Principal credentials¶
To validate Azure AD Service Principal credentials for troubleshooting purposes, you can use the following command line example:
Validate Azure AD Service Principal credentials
exportMLOPS_API_TOKEN="n/a"# not used for Azure auth check, but the environment variable must be present
envPYTHONPATH=./\
pythondatarobot_mlflow/drflow_cli.py\--verbose\--auth-typeazure-service-principal\--service-provider-typeazure-databricks\--actionvalidate-auth