mlflow.azureml

The mlflow.azureml module provides an API for deploying MLflow models to Azure Machine Learning.

mlflow.azureml.deploy(app_name, model_path, run_id=None, mlflow_home=None)

Deploy an MLflow model to Azure Machine Learning.

Note

  • This command must be called from a console launched from Azure Machine Learning Workbench. Caller is reponsible for setting up Azure Machine Learning environment and accounts.
  • Azure Machine Learning cannot handle any Conda environment. In particular the Python version is fixed. If the model contains Conda environment and it has been trained outside of Azure Machine Learning, the Conda environment might need to be edited to work with Azure Machine Learning.
Parameters:
  • app_name – Name of the deployed application.
  • model_path – Local or MLflow-run-relative path to the model to be deployed.
  • run_id – MLflow run ID.
  • mlflow_home – Directory containing checkout of the MLflow GitHub project or current directory if not specified.
mlflow.azureml.export(output, model_path, run_id=None, mlflow_home=None)

Export an MLflow model with everything needed to deploy on Azure Machine Learning. Output includes sh script with command to deploy the generated model to Azure Machine Learning.

Note

  • This command does not need an Azure Machine Learning environment to run.
  • Azure Machine Learning cannot handle any Conda environment. In particular the Python version is fixed. If the model contains Conda environment and it has been trained outside of Azure Machine Learning, the Conda environment might need to be edited to work with Azure Machine Learning.
Parameters:
  • output – Output folder where the model is going to be exported to.
  • model_path – Local or MLflow run relative path to the model to be exported.
  • run_id – MLflow run ID.
  • mlflow_home – Directory containing checkout of the MLflow GitHub project or current directory if not specified.