datarobot-mlflow client to synchronize an MLFlow model with DataRobot model
Project description
mlflow-integration
This script and library exports a model from an MLflow model registry, and uploads key-values to an existing DataRobot model package.
Setup
- Python 3.7 or later
pip install datarobot-mlflow
- if using Azure:
pip install "datarobot-mlflow[azure]"
- if using Azure:
DataRobot information
- URL of DataRobot instance, example
https://app.datarobot.com
- ID of DataRobot model package to post key-values; example:
64227b4bf82db411c90c3209
export MLOPS_API_TOKEN=<API token from DataRobot Developer Tools>
Local MLflow information
- MLflow tracking URI; example
"file:///Users/me/mlflow/examples/mlruns"
- Model name; example
"cost-model"
- Model version; example
"2"
Azure DataBricks MLFlow with Service Principal information
- MLflow tracking URI; example
"azureml://region.api.azureml.ms/mlflow/v1.0/subscriptions/subscription-id/resourceGroups/resource-group-name/providers/Microsoft.MachineLearningServices/workspaces/azure-ml-workspace-name'"
- Model name; example
"cost-model"
- Model version; example
"2"
- Provide service principal details in environment:
export AZURE_TENANT_ID="<tenant-id>"
export AZURE_CLIENT_ID="<client-id>"
export AZURE_CLIENT_SECRET="<secret>"
Invocation
ACTION=sync # other actions: delete-all-dr-keys, list-mlflow-keys
DR_MODEL_ID="<MODEL_PACKAGE_ID>"
drflow-cli \
--mlflow-url http://localhost:8080 \
--mlflow-model diabetes-1 \
--mlflow-model-version 1 \
--dr-model $DR_MODEL_ID \
--dr-url https://app.datarobot.com \
--with-artifacts \
--verbose \
--action $ACTION
Reference scripts
type run.sh
as an example, to see installed locationrun.sh
uses the drflow CLI to sync key-valuesvalidate-auth.sh
uses the CLI to validate Azure credentials only
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for datarobot_mlflow-0.1.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc86fa3570048943cd118530c858611d2f2345a37fd95743a569e4a9e01427a |
|
MD5 | 513b33ea3134a150a6d20ece346ff455 |
|
BLAKE2b-256 | 564475a57729129519226b974effa3b62ed7d95cf7b661501bdd718e0cfe3572 |