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
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,12 @@ ms.custom:
18
18
19
19
# Tutorial: Model development on a cloud workstation
20
20
21
-
This article describes how to develop a training script with a notebook on an Azure Machine Learning cloud workstation. The tutorial covers the basic steps that you need to get started:
21
+
This article describes how to develop a training script by using a notebook on an Azure Machine Learning cloud workstation. The tutorial covers the basic steps that you need to get started:
22
22
23
23
> [!div class="checklist"]
24
24
> * Set up and configure the cloud workstation. Your cloud workstation is powered by an Azure Machine Learning compute instance, which is pre-configured with environments to support your model development needs.
25
25
> * Use cloud-based development environments.
26
-
> * Use MLflow to track your model metrics, all from within a notebook.
26
+
> * Use MLflow to track your model metrics.
27
27
28
28
## Prerequisites
29
29
@@ -49,19 +49,20 @@ In the compute instance list, select the **VS Code (Web)** or **VS Code (Desktop
49
49
50
50
This Visual Studio Code instance is attached to your compute instance and your workspace file system. Even if you open it on your desktop, the files you see are files in your workspace.
51
51
52
-
## Set up a new environment for prototyping (optional)
52
+
## Set up a new environment for prototyping
53
53
54
54
In order for your script to run, you need to be working in an environment that's configured with the dependencies and libraries the code expects. This section helps you create an environment that's tailored to your code. To create the new Jupyter kernel your notebook connects to, you use a YAML file that defines the dependencies.
55
55
56
56
***Upload a file.**
57
57
58
58
Files that you upload are stored in an Azure file share, and these files are mounted to each compute instance and shared within the workspace.
59
59
60
-
1. Download the conda environment file [*workstation_env.yml*](https://github.com/Azure/azureml-examples/blob/main/tutorials/get-started-notebooks/workstation_env.yml) to your computer by using the **Download raw file** button in the top-right corner of the page.
60
+
1. Go to [azureml-examples/tutorials/get-started-notebooks/workstation_env.yml](https://github.com/Azure/azureml-examples/blob/main/tutorials/get-started-notebooks/workstation_env.yml).
61
+
1. Download the Conda environment file [*workstation_env.yml*](https://github.com/Azure/azureml-examples/blob/main/tutorials/get-started-notebooks/workstation_env.yml) to your computer selecting the ellipsis button (**...**) in the top-right corner of the page and then selecing **Download**.
61
62
1. Drag the file from your computer to the Visual Studio Code window. The file is uploaded to your workspace.
62
63
1. Move the file into your username folder.
63
64
64
-
:::image type="content" source="media/tutorial-cloud-workstation/upload-file.png" alt-text="Screenshot shows how to upload a file.":::
65
+
:::image type="content" source="media/tutorial-cloud-workstation/upload-file.png" alt-text="Screenshot that shows the workstation_env.yml file in the username folder.":::
65
66
66
67
1. Select the file to preview it. Review the dependencies that it specifies. You should see something like this:
67
68
@@ -126,14 +127,14 @@ You now have a new kernel. Next, you'll open a notebook and use this kernel.
126
127
127
128
## Create a notebook
128
129
129
-
1. In the menu at the top of the app, select**File> New File**.
130
+
1. In the menu at the top of Visual Studio Code, select**File> New File**.
130
131
1. Name your new file **develop-tutorial.ipynb** (or use another name). Be sure to use the **.ipynb** extension.
131
132
132
133
## Set the kernel
133
134
134
-
1. On the top-right corner of the app, select**Selectkernel**.
135
+
1. On the top-right corner of the new file, select**SelectKernel**.
135
136
1. Select **Azure ML compute instance (computeinstance-name)**.
136
-
1. Select the kernel you created: **Tutorial Workstation Env**. If you don't see the kernel, select the **Refresh** button in the top-right corner of the app.
137
+
1. Select the kernel you created: **Tutorial Workstation Env**. If you don't see the kernel, select the refresh button above the list.
137
138
138
139
## Develop a training script
139
140
@@ -163,6 +164,7 @@ This code uses `sklearn` for training and MLflow for logging the metrics.
163
164
164
165
> [!NOTE]
165
166
> You can ignore the MLflow warnings. The results you need will still be tracked.
167
+
1. Select **Run All** above the code.
166
168
167
169
## Iterate
168
170
@@ -173,6 +175,8 @@ Now that you have model results, you might want to change something and try agai
173
175
> [!NOTE]
174
176
> You can ignore the MLflow warnings. The results you need will still be tracked.
175
177
178
+
Select **Run All** to run the model.
179
+
176
180
## Examine the results
177
181
178
182
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.
@@ -183,12 +187,12 @@ Now that you've tried two different models, use the results tracked by MLFfow to
183
187
:::image type="content" source="media/tutorial-cloud-workstation/jobs.png" alt-text="Screenshot that shows the Jobs item in the left pane.":::
184
188
185
189
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.
190
+
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 button next to it.
191
+
1. Select the link for the first job. The name appears at the top of the page. You can also rename it here by using the pencil button.
192
+
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
193
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.)
190
194
191
-
:::image type="content" source="media/tutorial-cloud-workstation/metrics.png" alt-text="Screenshot that shows metrics for a job.":::
195
+
:::image type="content" source="media/tutorial-cloud-workstation/metrics.png" alt-text="Screenshot that shows metrics for a job." lightbox="media/tutorial-cloud-workstation/metrics.png":::
192
196
193
197
1. Select the **Images** tab to view the images generated by MLflow.
194
198
@@ -215,11 +219,11 @@ You now have a Python script to use for training your preferred model.
215
219
216
220
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.
217
221
218
-
1. Select the environment you created earlier in this tutorial as your Python version (workstations_env). In the lowerright corner of the notebook, you'll see the environment name. Select it, and thenselectthe environment in the middle of the page.
222
+
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 at the top of Visual Studio Code.
219
223
220
224
:::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":::
221
225
222
-
1. Run the Python script by selecting the run button in the upper-right corner of the screen.
226
+
1. Run the Python script by selecting the **Run All**button above the code.
223
227
224
228
:::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":::
0 commit comments