You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/tutorial-cloud-workstation.md
+32-34Lines changed: 32 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,91 +175,89 @@ Now that you have model results, you might want to change something and try agai
175
175
176
176
## Examine the results
177
177
178
-
Now that you've tried two different models, use the results tracked by MLFfow to decide which model is better. You can reference metrics like accuracy, or other indicators that matter the most foryour scenarios. You can dive into these resultsin more detail by looking at the jobs created by `MLflow`.
178
+
Now that you've tried two different models, use the results tracked by MLFfow to decide which model is better. You can reference metrics like accuracy, or other indicators that matter the most foryour scenarios. You can review these resultsin more detail by looking at the jobs created by MLflow.
179
179
180
180
1. Return to your workspace in the [Azure Machine Learning studio](https://ml.azure.com).
181
-
1. On the left navigation, select**Jobs**.
181
+
1. In the left pane, select**Jobs**.
182
182
183
-
:::image type="content" source="media/tutorial-cloud-workstation/jobs.png" alt-text="Screenshot shows how to select Jobs in the navigation.":::
183
+
:::image type="content" source="media/tutorial-cloud-workstation/jobs.png" alt-text="Screenshot that shows the Jobs item in the left pane.":::
184
184
185
-
1. Select the link for**Develop on cloud tutorial**.
186
-
1. There are two different jobs shown, one for each of the models you tried. These names are autogenerated. As you hover over a name, use the pencil tool next to the name if you want to rename it.
187
-
1. Select the link for the first job. The name appears at the top. You can also rename it here with the pencil tool.
188
-
1. The page shows details of the job, such as properties, outputs, tags, and parameters. Under **Tags**, you'll see the estimator_name, which describes the type of model.
185
+
1. Select **Develop on cloud tutorial**.
186
+
1. There are two different jobs shown, one for each of the models you tried. The names are autogenerated. If you want to rename the job, hover over the name and selectthe pencil tool next to it.
187
+
1. Select the link for the first job. The name appears at the top of the page. You can also rename it there by using the pencil tool.
188
+
1. The page shows job details, like properties, outputs, tags, and parameters. Under **Tags**, you see the estimator_name, which describes the type of model.
189
+
1. Select the **Metrics** tab to view the metrics that were logged by MLflow. (Your results will be different because you have a different training set.)
189
190
190
-
1. Select the **Metrics** tab to view the metrics that were logged by `MLflow`. (Expect your results to differ, as you have a different training set.)
191
+
:::image type="content" source="media/tutorial-cloud-workstation/metrics.png" alt-text="Screenshot that shows metrics for a job.":::
191
192
192
-
:::image type="content" source="media/tutorial-cloud-workstation/metrics.png" alt-text="Screenshot shows metrics for a job.":::
193
+
1. Select the **Images** tab to view the images generated by MLflow.
193
194
194
-
1. Select the **Images** tab to view the images generated by `MLflow`.
195
-
196
-
:::image type="content" source="media/tutorial-cloud-workstation/images.png" alt-text="Screenshot shows images for a job.":::
195
+
:::image type="content" source="media/tutorial-cloud-workstation/images.png" alt-text="Screenshot that shows images for a job.":::
197
196
198
197
1. Go back and review the metrics and images for the other model.
199
198
200
199
## Create a Python script
201
200
202
-
Now create a Python script from your notebook for model training.
203
-
204
-
1. In your VS Code window, right-click on the notebook filename and select **Import Notebook to Script**.
201
+
You'll now create a Python script from your notebook for model training.
205
202
206
-
1. Use the menu **File > Save** to save this new script file. Call it **train.py**.
207
-
1. Look through this file and delete the code you don't want in the training script. For example, keep the code for the model you wish to use, and delete code for the model you don't want.
208
-
* Make sure you keep the code that starts autologging (`mlflow.sklearn.autolog()`).
209
-
* When you run the Python script interactively (as you're doing here), you can keep the line that defines the experiment name (`mlflow.set_experiment("Develop on cloud tutorial")`). Or even give it a different name to see it as a different entry in the **Jobs** section. But when you prepare the script for a training job, that line doesn't apply and should be omitted - the job definition includes the experiment name.
210
-
* When you train a single model, the lines to start and end a run (`mlflow.start_run()` and `mlflow.end_run()`) are also not necessary (they'll have no effect), but can be left inif you wish.
203
+
1. In Visual Studio Code, right-click the notebook file name and select **Import Notebook to Script**.
204
+
1. Select **File > Save** to save the new script file. Call it **train.py**.
205
+
1. Look through the file and delete code that you don't want in the training script. For example, keep the code for the model you want to use, and delete code for the model you don't want to use.
206
+
* Be sure you keep the code that starts autologging (`mlflow.sklearn.autolog()`).
207
+
* When you run the Python script interactively (as you're doing here), you can keep the line that defines the experiment name (`mlflow.set_experiment("Develop on cloud tutorial")`). Or you can give it a different name to see it as a different entry in the **Jobs** section. But when you prepare the script for a training job, that line doesn't apply and should be omitted: the job definition includes the experiment name.
208
+
* When you train a single model, the lines for starting and ending a run (`mlflow.start_run()` and `mlflow.end_run()`) are not necessary (they have no effect), but you can can leave them in.
211
209
212
210
1. When you're finished with your edits, save the file.
213
211
214
212
You now have a Python script to use for training your preferred model.
215
213
216
214
## Run the Python script
217
215
218
-
For now, you're running this code on your compute instance, which is your Azure Machine Learning development environment. [Tutorial: Train a model](tutorial-train-model.md) shows you how to run a training script in a more scalable way on more powerful compute resources.
216
+
For now, you're running this code on your compute instance, which is your Azure Machine Learning development environment. [Tutorial: Train a model](tutorial-train-model.md) shows how to run a training script in a more scalable way on more powerful compute resources.
219
217
220
-
1. Select the environment you created earlier in this tutorial as your Python version (workstations_env). In the lower right corner of the notebook, you'll see the environment name. Select it, then select the environment in the middle of the screen.
218
+
1. Select the environment you created earlier in this tutorial as your Python version (workstations_env). In the lower right corner of the notebook, you'll see the environment name. Select it, and thenselectthe environment in the middle of the page.
221
219
222
-
:::image type="content" source="media/tutorial-cloud-workstation/select-python.png" alt-text="Screenshot shows selecting the new environment.":::
220
+
:::image type="content" source="media/tutorial-cloud-workstation/select-python.png" alt-text="Screenshot that shows selecting the new environment." lightbox="media/tutorial-cloud-workstation/select-python.png":::
223
221
224
-
1. Now run the Python script. Use the **Run Python File** tool on the top right.
222
+
1. Run the Python script by selecting the run button in the upper-right corner of the screen.
225
223
226
-
:::image type="content" source="media/tutorial-cloud-workstation/run-python.png" alt-text="Screenshot shows the Run Python File tool at the top right of the screen.":::
224
+
:::image type="content" source="media/tutorial-cloud-workstation/run-python.png" alt-text="Screenshot that shows the Run button." lightbox="media/tutorial-cloud-workstation/run-python.png":::
227
225
228
226
> [!NOTE]
229
-
> You can ignore the mlflow warnings. You'll still get all the metrics and images from autologging.
227
+
> You can ignore the MLflow warnings. You'll still get all the metrics and images from autologging.
230
228
231
-
## Examine script results
229
+
## Examine the script results
232
230
233
-
Go back to **Jobs**in your workspace in Azure Machine Learning studio to see the results of your training script. Keep in mind that the training data changes with each split, so the results differ between runs as well.
231
+
Go back to **Jobs** in your workspace in Azure Machine Learning studio to see the results of your training script. Keep in mind that the training data changes with each split, so the results differ between runs.
234
232
235
233
## Clean up resources
236
234
237
-
If you plan to continuenow to other tutorials, skip to [Next steps](#next-steps).
235
+
If you plan to continue on to other tutorials, skip to [Next steps](#next-steps).
238
236
239
237
### Stop compute instance
240
238
241
239
If you're not going to use it now, stop the compute instance:
242
240
243
241
1. In the studio, in the left pane, select**Compute**.
244
-
1. In the top tabs, select **Compute instances**
245
-
1. Select the compute instance in the list.
246
-
1. On the top toolbar, select **Stop**.
242
+
1. At the top of the page, select**Compute instances**.
* [From artifacts to models in MLflow](concept-mlflow-models.md)
257
255
* [Using Git with Azure Machine Learning](concept-train-model-git-integration.md)
258
256
* [Running Jupyter notebooks in your workspace](how-to-run-jupyter-notebooks.md)
259
257
* [Working with a compute instance terminal in your workspace](how-to-access-terminal.md)
260
258
* [Manage notebook and terminal sessions](how-to-manage-compute-sessions.md)
261
259
262
-
This tutorial showed you the early steps of creating a model, prototyping on the same machine where the code resides. For your production training, learn how to use that training script on more powerful remote compute resources:
260
+
This tutorial shows the early steps of creating a model, prototyping on the same machine where the code resides. For your production training, learn how to use that training script on more powerful remote compute resources:
0 commit comments