Skip to content

Commit 9641dda

Browse files
committed
edits
1 parent be8b7fc commit 9641dda

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

articles/machine-learning/how-to-use-mlflow-cli-runs.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,15 @@ See [MLflow and Azure Machine Learning](concept-mlflow.md) for all supported MLf
4242

4343
## Track runs from your local machine
4444

45-
MLflow Tracking with Azure Machine Learning lets you store the logged metrics and artifacts runs that were executed on your local machine into your Azure Machine Learning workspace. Make sure you are logged in to your Azure account, otherwise your the tracking URI returns an empty string.
45+
MLflow Tracking with Azure Machine Learning lets you store the logged metrics and artifacts runs that were executed on your local machine into your Azure Machine Learning workspace.
4646

4747
### Set up tracking environment
4848

4949
To track a local run, you need to point your local machine to the Azure Machine Learning MLflow Tracking URI.
5050

51+
>[!IMPORTANT]
52+
> Make sure you are logged in to your Azure account, otherwise the tracking URI returns an empty string.
53+
5154
# [MLflow SDK](#tab/mlflow)
5255

5356
The following code uses `mlflow` and the [`subprocess`](https://docs.python.org/3/library/subprocess.html) classes in Python to run the Azure Machine Learning CLI (v2) command to retrieve the unique MLFLow tracking URI associated with your workspace. Then the method [`set_tracking_uri()`](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.set_tracking_uri) points the MLflow tracking URI to that URI.
@@ -56,23 +59,23 @@ The following code uses `mlflow` and the [`subprocess`](https://docs.python.org/
5659
import mlflow
5760
import subprocess
5861

59-
#Get MLFLow URI through the Azure ML CLI (v2) and convert to string
62+
#Get MLfLow URI through the Azure ML CLI (v2) and convert to string
6063
MLFLOW_TRACKING_URI = subprocess.run(["az", "ml", "workspace", "show", "--query", "mlflow_tracking_uri", "-o", "tsv"], stdout=subprocess.PIPE, text=True)
6164

6265
MLFLOW_TRACKING_URI = str(MLFLOW_TRACKING_URI.stdout).strip()
6366

6467
## Set the MLFLOW TRACKING URI
6568
mlflow.set_tracking_uri(MLFLOW_TRACKING_URI)
6669

67-
## Make sure the MLFLow URI looks something like this:
70+
## Make sure the MLflow URI looks something like this:
6871
## azureml://westus.api.azureml.ms/mlflow/v1.0/subscriptions/<Sub-ID>/resourceGroups/<RG>/providers/Microsoft.MachineLearningServices/workspaces/<WS>
6972

7073
print("MLFlow Tracking URI:",MLFLOW_TRACKING_URI)
7174
```
7275

7376
# [Terminal](#tab/terminal)
7477

75-
Another option is to set one of the MLflow environment variables [MLFLOW_TRACKING_URI](https://mlflow.org/docs/latest/tracking.html#logging-to-a-tracking-server) directly in your terminal.
78+
Another option is to set one of the MLflow environment variables [MLFLOW_TRACKING_URI](https://mlflow.org/docs/latest/tracking.html#logging-to-a-tracking-server) directly in your terminal.
7679

7780
```Azure CLI
7881
# Configure MLflow to communicate with a Azure Machine Learning-hosted tracking server
@@ -84,7 +87,7 @@ export MLFLOW_TRACKING_URI=$(az ml workspace show --query mlflow_tracking_uri |
8487

8588
### Set experiment name
8689

87-
All MLflow runs are logged to the active experiment, which can be set using MLflow SDK or the Azure CLI.
90+
All MLflow runs are logged to the active experiment, which can be set with the MLflow SDK or Azure CLI.
8891

8992
# [MLflow SDK](#tab/mlflow)
9093

@@ -130,7 +133,7 @@ MLflow Tracking with Azure Machine Learning lets you store the logged metrics an
130133

131134
First, you should create a `src` subdirectory and create a file with your training code in a `train.py` file in the `src` subdirectory. All your training code will go into the `src` subdirectory, including `train.py`.
132135

133-
The training code is taken from this [MLFLow example](https://github.com/Azure/azureml-examples/blob/main/cli/jobs/basics/src/hello-mlflow.py) in the Azure Machine Learning example repo.
136+
The training code is taken from this [MLfLow example](https://github.com/Azure/azureml-examples/blob/main/cli/jobs/basics/src/hello-mlflow.py) in the Azure Machine Learning example repo.
134137

135138
Copy this code into the file:
136139

articles/machine-learning/how-to-use-mlflow.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ ms.custom: devx-track-python, mlflow
1717

1818
In this article, learn how to enable MLflow's tracking URI and logging API, collectively known as [MLflow Tracking](https://mlflow.org/docs/latest/quickstart.html#using-the-tracking-api), to connect Azure Machine Learning as the backend of your MLflow experiments.
1919

20+
> [!TIP]
21+
> For a more streamlined experience, see how to [Track experiments with the MLflow SDK or the Azure Machine Learning CLI (v2) (preview)](how-to-use-mlflow-cli.md)
22+
2023
Supported capabilities include:
2124

2225
+ Track and log experiment metrics and artifacts in your [Azure Machine Learning workspace](./concept-azure-machine-learning-architecture.md#workspace). If you already use MLflow Tracking for your experiments, the workspace provides a centralized, secure, and scalable location to store training metrics and models.
@@ -123,7 +126,7 @@ run.get_metrics()
123126

124127
## Manage models
125128

126-
Register and track your models with the [Azure Machine Learning model registry](concept-model-management-and-deployment.md#register-package-and-deploy-models-from-anywhere) which supports the MLflow model registry. Azure Machine Learning models are aligned with the MLflow model schema making it easy to export and import these models across different workflows. The MLflow related metadata such as, run ID is also tagged with the registered model for traceability. Users can submit training runs, register, and deploy models produced from MLflow runs.
129+
Register and track your models with the [Azure Machine Learning model registry](concept-model-management-and-deployment.md#register-package-and-deploy-models-from-anywhere), which supports the MLflow model registry. Azure Machine Learning models are aligned with the MLflow model schema making it easy to export and import these models across different workflows. The MLflow related metadata such as, run ID is also tagged with the registered model for traceability. Users can submit training runs, register, and deploy models produced from MLflow runs.
127130

128131
If you want to deploy and register your production ready model in one step, see [Deploy and register MLflow models](how-to-deploy-mlflow-models.md).
129132

0 commit comments

Comments
 (0)