Skip to content

Commit a3029f8

Browse files
authored
Raising Acrolinx
1 parent dca96d7 commit a3029f8

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.devlang: azurecli
1616

1717
# Track ML experiments and models with MLflow
1818

19-
> [!div class="op_single_selector" title1="Select the version of Azure Machine Learning developer platform you are using:"]
19+
> [!div class="op_single_selector" title1="Select the version of Azure Machine Learning developer platform you're using:"]
2020
> * [v1](./v1/how-to-use-mlflow.md)
2121
> * [v2 (current version)](how-to-use-mlflow-cli-runs.md)
2222
@@ -32,16 +32,16 @@ __Tracking__ refers to process of saving all experiment's related information th
3232
> - Evaluation visualizations (confusion matrix, importance plots)
3333
> - Evaluation results (including some evaluation predictions)
3434
35-
Some of these elements are automatically tracked by Azure Machine Learning when working with jobs (including code, environment, and input and output data). However, others like models, parameters, and metrics, need to be instrumented by the model builder as it is specific to the particular scenario.
35+
Some of these elements are automatically tracked by Azure Machine Learning when working with jobs (including code, environment, and input and output data). However, others like models, parameters, and metrics, need to be instrumented by the model builder as it's specific to the particular scenario.
3636

37-
In this article, you will learn how to use MLflow for tracking your experiments and runs in Azure Machine Learning workspaces.
37+
In this article, you'll learn how to use MLflow for tracking your experiments and runs in Azure Machine Learning workspaces.
3838

3939
> [!NOTE]
4040
> If you want to track experiments running on Azure Databricks or Azure Synapse Analytics, see the dedicated articles [Track Azure Databricks ML experiments with MLflow and Azure Machine Learning](how-to-use-mlflow-azure-databricks.md) or [Track Azure Synapse Analytics ML experiments with MLflow and Azure Machine Learning](how-to-use-mlflow-azure-synapse.md).
4141
4242
## Benefits of tracking experiments
4343

44-
We highly encourage machine learning practitioners to instrument their experimentation by tracking them, regardless if they are training with jobs in Azure Machine Learning or interactively in notebooks. Benefits include:
44+
We highly encourage machine learning practitioners to instrument their experimentation by tracking them, regardless if they're training with jobs in Azure Machine Learning or interactively in notebooks. Benefits include:
4545

4646
- All of your ML experiments are organized in a single place, allowing you to search and filter experiments to find the information and drill down to see what exactly it was that you tried before.
4747
- Compare experiments, analyze results, and debug model training with little extra work.
@@ -85,9 +85,9 @@ Azure Machine Learning tracks any training job in what MLflow calls a run. Use r
8585

8686
# [Working interactively](#tab/interactive)
8787

88-
When working interactively, MLflow starts tracking your training routine as soon as you try to log information that requires an active run. For instance, when you log a metric, log a parameter, or when you start a training cycle when Mlflow's autologging functionality is enabled. However, it is usually helpful to start the run explicitly, specially if you want to capture the total time of your experiment in the field __Duration__. To start the run explicitly, use `mlflow.start_run()`.
88+
When working interactively, MLflow starts tracking your training routine as soon as you try to log information that requires an active run. For instance, when you log a metric, log a parameter, or when you start a training cycle when Mlflow's autologging functionality is enabled. However, it's usually helpful to start the run explicitly, specially if you want to capture the total time of your experiment in the field __Duration__. To start the run explicitly, use `mlflow.start_run()`.
8989

90-
Regardless if you started the run manually or not, you will eventually need to stop the run to inform MLflow that your experiment run has finished and marks its status as __Completed__. To do that, all `mlflow.end_run()`. We strongly recommend starting runs manually so you don't forget to end them when working on notebooks.
90+
Regardless if you started the run manually or not, you'll eventually need to stop the run to inform MLflow that your experiment run has finished and marks its status as __Completed__. To do that, all `mlflow.end_run()`. We strongly recommend starting runs manually so you don't forget to end them when working on notebooks.
9191

9292
```python
9393
mlflow.start_run()
@@ -97,7 +97,7 @@ mlflow.start_run()
9797
mlflow.end_run()
9898
```
9999

100-
To help you avoid forgetting to end the run, it is usually helpful to use the context manager paradigm:
100+
To help you avoid forgetting to end the run, it's usually helpful to use the context manager paradigm:
101101

102102
```python
103103
with mlflow.start_run() as run:
@@ -121,21 +121,21 @@ When working with jobs, you typically place all your training logic inside of a
121121

122122
:::code language="python" source="~/azureml-examples-main/cli/jobs/basics/src/hello-mlflow.py" highlight="9-10,12":::
123123

124-
The previous code example doesn't uses `mlflow.start_run()` but if used you can expect MLflow to reuse the current active run so there is no need to remove those lines if migrating to Azure Machine Learning.
124+
The previous code example doesn't uses `mlflow.start_run()` but if used you can expect MLflow to reuse the current active run so there's no need to remove those lines if migrating to Azure Machine Learning.
125125

126126
### Adding tracking to your routine
127127

128128
Use MLflow SDK to track any metric, parameter, artifacts, or models. For detailed examples about how to log each, see [Log metrics, parameters and files with MLflow](how-to-log-view-metrics.md).
129129

130130
### Ensure your job's environment has MLflow installed
131131

132-
All Azure Machine Learning environments already have MLflow installed for you, so no action is required if you are using a curated environment. If you want to use a custom environment:
132+
All Azure Machine Learning environments already have MLflow installed for you, so no action is required if you're using a curated environment. If you want to use a custom environment:
133133

134134
1. Create a `conda.yml` file with the dependencies you need:
135135

136136
:::code language="yaml" source="~/azureml-examples-main//sdk/python/using-mlflow/deploy/environment/conda.yml" highlight="7-8" range="1-12":::
137137

138-
1. Reference the environment in the job you are using.
138+
1. Reference the environment in the job you're using.
139139

140140
### Configuring job's name
141141

@@ -163,11 +163,11 @@ Use the parameter `display_name` of Azure Machine Learning jobs to configure the
163163
)
164164
```
165165

166-
2. Ensure you are not using `mlflow.start_run(run_name="")` inside of your training routine.
166+
2. Ensure you're not using `mlflow.start_run(run_name="")` inside of your training routine.
167167

168168
### Submitting the job
169169

170-
1. First, let's connect to Azure Machine Learning workspace where we are going to work on.
170+
1. First, let's connect to Azure Machine Learning workspace where we're going to work on.
171171

172172
# [Azure CLI](#tab/cli)
173173

@@ -236,7 +236,7 @@ The metrics and artifacts from MLflow logging are tracked in your workspace. To
236236

237237
:::image type="content" source="media/how-to-log-view-metrics/metrics.png" alt-text="Screenshot of the metrics view.":::
238238

239-
Select the logged metrics to render charts on the right side. You can customize the charts by applying smoothing, changing the color, or plotting multiple metrics on a single graph. You can also resize and rearrange the layout as you wish. Once you have created your desired view, you can save it for future use and share it with your teammates using a direct link.
239+
Select the logged metrics to render charts on the right side. You can customize the charts by applying smoothing, changing the color, or plotting multiple metrics on a single graph. You can also resize and rearrange the layout as you wish. Once you've created your desired view, you can save it for future use and share it with your teammates using a direct link.
240240

241241
You can also access or __query metrics, parameters and artifacts programatically__ using the MLflow SDK. Use [mlflow.get_run()](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.get_run) as explained bellow:
242242

@@ -255,7 +255,7 @@ print(metrics, params, tags)
255255
> [!TIP]
256256
> For metrics, the previous example will only return the last value of a given metric. If you want to retrieve all the values of a given metric, use `mlflow.get_metric_history` method as explained at [Getting params and metrics from a run](how-to-track-experiments-mlflow.md#getting-params-and-metrics-from-a-run).
257257

258-
To download artifacts you have logged, like files and models, you can use [mlflow.artifacts.download_artifacts()](https://www.mlflow.org/docs/latest/python_api/mlflow.artifacts.html#mlflow.artifacts.download_artifacts)
258+
To download artifacts you've logged, like files and models, you can use [mlflow.artifacts.download_artifacts()](https://www.mlflow.org/docs/latest/python_api/mlflow.artifacts.html#mlflow.artifacts.download_artifacts)
259259

260260
```python
261261
mlflow.artifacts.download_artifacts(run_id="<RUN_ID>", artifact_path="helloworld.txt")
@@ -265,7 +265,7 @@ For more details about how to __retrieve or compare__ information from experimen
265265

266266
## Example notebooks
267267

268-
If you are looking for examples about how to use MLflow in Jupyter notebooks, please see our example's repository [Using MLflow (Jupyter Notebooks)](https://github.com/Azure/azureml-examples/tree/main/sdk/python/using-mlflow).
268+
If you're looking for examples about how to use MLflow in Jupyter notebooks, please see our example's repository [Using MLflow (Jupyter Notebooks)](https://github.com/Azure/azureml-examples/tree/main/sdk/python/using-mlflow).
269269

270270
## Limitations
271271

0 commit comments

Comments
 (0)