mlflow Package

Contains functionality integrating Azure Machine Learning with MLFlow.

MLflow (https://mlflow.org/) is an open-source platform for tracking machine learning experiments and managing models. You can use MLflow logging APIs with Azure Machine Learning so that the metrics and artifacts are logged to your Azure machine learning workspace.

Within an Azure Machine Learning workspace, add the code below to use MLflow. The get_mlflow_tracking_uri method sets the MLflow tracking URI to point to your workspace.

import mlflow
from azureml.core import Workspace
workspace = Workspace.from_config()
mlflow.set_tracking_uri(workspace.get_mlflow_tracking_uri())

More examples can be found at https://aka.ms/azureml-mlflow-examples.

Modules

entry_point_loaders

Contains loaders for integrating Azure Machine Learning with MLflow.

Functions

get_portal_url

Get the URL to the Azure Machine Learning studio page for viewing run details.

get_portal_url(run)

Parameters

run
Run

The run for which to view details.

Returns

A URL to the Azure Machine Learning studio which can be used to view run details, including run artifacts.

Return type

str

register_model

Register a model with the specified name and artifact path.

register_model(run, name, path, tags=None, **kwargs)

Parameters

name
str

The name to give the registered model.

path
str

The relative cloud path to the model, for example, "outputs/modelname".

tags
dict[str, str]

An optional dictionary of key value tags to pass to the model.

kwargs
dict
default value: None

Optional parameters.

Returns

A registered model.

Return type

Remarks


   model = register_model(run, 'best_model', 'outputs/model.pkl', tags={'my': 'tag'})