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
+39-39Lines changed: 39 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,82 +18,82 @@ 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 basics you need to get started:
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:
22
22
23
23
> [!div class="checklist"]
24
-
> * Set up and configuring the cloud workstation. Your cloud workstation is powered by an Azure Machine Learning compute instance, which is pre-configured with environments to support your various model development needs.
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
26
> * Use MLflow to track your model metrics, all from within a notebook.
The **Compute** section in your workspace allows you to create compute resources. A compute instance is a cloud-based workstation fully managed by Azure Machine Learning. This tutorial series uses a compute instance. You can also use it to run your own code, and to develop and test models.
34
+
You can create compute resources in the **Compute** section in your workspace. A compute instance is a cloud-based workstation that's fully managed by Azure Machine Learning. This tutorial series uses a compute instance. You can also use it to run your own code, and to develop and test models.
35
35
36
36
1. Sign in to [Azure Machine Learning studio](https://ml.azure.com).
37
-
1. Select your workspace if it isn't already open.
38
-
1.On the left navigation, select **Compute**.
39
-
1. If you don't have a compute instance, you'll see **New** in the middle of the screen. Select **New** and fill out the form. You can use all the defaults.
37
+
1. Select your workspace, if it isn't already open.
38
+
1.In the left pane, select **Compute**.
39
+
1. If you don't have a compute instance, you see **New** in the middle of the screen. Select **New** and fill out the form. You can use all the defaults.
40
40
1. If you have a compute instance, select it from the list. If it's stopped, select **Start**.
41
41
42
42
## Open Visual Studio Code (VS Code)
43
43
44
-
Once you have a running compute instance, you can access it in various ways. This tutorial shows using the compute instance from VS Code. VS Code gives you a full integrated development environment (IDE) with the power of Azure Machine Learning resources.
44
+
After you have a running compute instance, you can access it in various ways. This tutorial describes how to use the compute instance from Visual Studio Code. Visual Studio Code provides a full integrated development environment (IDE) for creating compute instances.
45
45
46
-
In the compute instance list, select the **VS Code (Web)** or **VS Code (Desktop)** link for the compute instance you want to use. If you choose **VS Code (Desktop)**, you might see a pop-up asking if you want to open the application.
46
+
In the compute instance list, select the **VS Code (Web)** or **VS Code (Desktop)** link for the compute instance you want to use. If you choose **VS Code (Desktop)**, you might see a message asking if you want to open the application.
47
47
48
-
:::image type="content" source="media/tutorial-cloud-workstation/launch-vs-code.png" alt-text="Screenshot shows links to launch VS Code (Web) or (Desktop).":::
48
+
:::image type="content" source="media/tutorial-cloud-workstation/launch-vs-code.png" alt-text="Screenshot that shows links for starting Visual Studio Code (Web or Desktop)." lightbox="media/tutorial-cloud-workstation/launch-vs-code.png":::
49
49
50
-
This VS 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.
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
52
## Set up a new environment for prototyping (optional)
53
53
54
-
In order for your script to run, you need to be working in an environment configured with the dependencies and libraries the code expects. This section helps you create an environment tailored to your code. To create the new Jupyter kernel your notebook connects to, you'll use a YAML file that defines the dependencies.
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
-
Files you upload are stored in an Azure file share, and these files are mounted to each compute instance and shared within the workspace.
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 this 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 at the topright.
61
-
1. Drag the file from your computer to the VS Code window. The file is uploaded to your workspace.
62
-
1. Move the file under your username folder.
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.
61
+
1. Drag the file from your computer to the Visual Studio Code window. The file is uploaded to your workspace.
62
+
1. Move the file into your username folder.
63
63
64
64
:::image type="content" source="media/tutorial-cloud-workstation/upload-file.png" alt-text="Screenshot shows how to upload a file.":::
65
65
66
-
1. Select this file to preview it, and see what dependencies it specifies. You'll see contents like this:
66
+
1. Select the file to preview it. Review the dependencies that it specifies. You should see something like this:
Now use the terminal to create a new Jupyter kernel, based on the *workstation_env.yml* file.
72
+
Now use the terminal to create a new Jupyter kernel that's based on the *workstation_env.yml* file.
73
73
74
-
1.On the top menu bar, select **Terminal > New Terminal**.
74
+
1.In the menu at the top of Visual Studio Code, select **Terminal > New Terminal**.
75
75
76
76
:::image type="content" source="media/tutorial-cloud-workstation/open-terminal.png" alt-text="Screenshot shows open terminal tool in notebook toolbar.":::
77
77
78
-
1. View your current conda environments. The active environment is marked with a *.
78
+
1. View your current Conda environments. The active environment is marked with an asterisk (*).
79
79
80
80
```bash
81
81
conda env list
82
82
```
83
83
84
-
1. `cd` to the folder where you uploaded the *workstation_env.yml* file. For example, if you uploaded it to your user folder:
84
+
1. Use `cd` to navigate to the folder where you uploaded the *workstation_env.yml* file. For example, if you uploaded it to your user folder, use this command:
85
85
86
86
```bash
87
87
cd Users/myusername
88
88
```
89
89
90
-
1. Make sure the workstation_env.yml is inthis folder.
90
+
1. Make sure the workstation_env.yml is inthe folder.
91
91
92
92
```bash
93
93
ls
94
94
```
95
95
96
-
1. Create the environment based on the conda file provided. It takes a few minutes to build this environment.
96
+
1. Create the environment based on the Conda file provided. It takes a few minutes to build the environment.
97
97
98
98
```bash
99
99
conda env create -f workstation_env.yml
@@ -106,54 +106,54 @@ In order for your script to run, you need to be working in an environment config
106
106
```
107
107
108
108
> [!NOTE]
109
-
> If you see a CommandNotFoundError, follow instructions to run `conda init bash`, close the terminal, and open a new one. Then retry the `conda activate workstation_env` command.
109
+
> If you see CommandNotFoundError, follow instructions to run `conda init bash`, close the terminal, and thenopen a new one. Then try the `conda activate workstation_env`command again.
110
110
111
-
1. Validate the correct environment is active, again looking for the environment marked with a *.
111
+
1. Verify that the correct environment is active, again looking for the environment marked with a *.
112
112
113
113
```bash
114
114
conda env list
115
115
```
116
116
117
-
1. Create a new Jupyter kernel based on your active environment.
117
+
1. Create a new Jupyter kernel that's based on your active environment.
You now have a new kernel. Next you'll open a notebook and use this kernel.
125
+
You now have a new kernel. Next, you'll open a notebook and use this kernel.
126
126
127
127
## Create a notebook
128
128
129
-
1. On the top menu bar, select **File > New File**.
130
-
1. Name your new file **develop-tutorial.ipynb** (or enter your preferred name). Make sure you use the **.ipynb** extension.
129
+
1. In the menu at the top of the app, select**File> New File**.
130
+
1. Name your new file **develop-tutorial.ipynb** (or use another name). Be sure to use the **.ipynb** extension.
131
131
132
132
## Set the kernel
133
133
134
-
1. On the topright, select **Select kernel**.
134
+
1. On the top-right corner of the app, select**Select kernel**.
135
135
1. Select **Azure ML compute instance (computeinstance-name)**.
136
-
1. Select the kernel you created, **Tutorial Workstation Env**. If you don't see it, selectthe**Refresh**tool at the topright.
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
137
138
138
## Develop a training script
139
139
140
-
In this section, you develop a Python training script that predicts credit card default payments, using the prepared test and training datasets from the [UCI dataset](https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients).
140
+
In this section, you develop a Python training script that predicts credit card default payments by using the prepared test and training datasets from the [UCI dataset](https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients).
141
141
142
142
This code uses `sklearn` for training and MLflow for logging the metrics.
143
143
144
-
1. Start with code that imports the packages and libraries you'll use in the training script.
144
+
1. Start with code that imports the packages and libraries that you'll use in the training script.
1. Add code to start autologging with `MLflow`, so that you can track the metrics and results. With the iterative nature of model development, `MLflow` helps you log model parameters and results. Refer back to those runs to compare and understand how your model performs. The logs also provide context for when you're ready to move from the development phase to the training phase of your workflows within Azure Machine Learning.
156
+
1. Add code to start autologging with MLflow so that you can track the metrics and results. With the iterative nature of model development, MLflow helps you log model parameters and results. Refer to the runs to compare and understand how your model performs. The logs also provide context for when you're ready to move from the development phase to the training phase of your workflows within Azure Machine Learning.
> You can ignore the mlflow warnings. You'll still get all the results you need tracked.
174
+
> You can ignore the MLflow warnings. The results you need will still be tracked.
175
175
176
-
## Examine results
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 most for your scenarios. You can dive into these results in 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 dive into 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).
0 commit comments