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/service/how-to-configure-environment.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ The DSVM is a customized virtual machine (VM) image. It's designed for data scie
85
85
86
86
The Azure Machine Learning SDK works on either the Ubuntu or Windows version of the DSVM. But if you plan to use the DSVM as a compute target as well, only Ubuntu is supported.
87
87
88
-
To use the DSVM as a development environment, do the following:
88
+
To use the DSVM as a development environment:
89
89
90
90
1. Create a DSVM in either of the following environments:
91
91
@@ -146,9 +146,9 @@ For more information, see [Data Science Virtual Machines](https://azure.microsof
146
146
147
147
## <a id="local"></a>Local computer
148
148
149
-
When you're using a local computer (which might also be a remote virtual machine), create an Anaconda environment and install the SDK by doing the following:
149
+
When you're using a local computer (which might also be a remote virtual machine), create an Anaconda environment and install the SDK. Here's an example:
150
150
151
-
1. Download and install [Anaconda](https://www.anaconda.com/distribution/#download-section) (Python 3.7 version) if you don't already have it.
151
+
1. Download and install [Anaconda](https://www.anaconda.com/distribution/#download-section) (Python 3.7 version) if you don't already have it.
152
152
153
153
1. Open an Anaconda prompt and create an environment with the following commands:
154
154
@@ -180,10 +180,10 @@ When you're using a local computer (which might also be a remote virtual machine
180
180
181
181
1. Use the following commands to install packages:
182
182
183
-
This command installs the base Azure Machine Learning SDK with notebook and automl extras. The `automl` extra is a large install, and can be removed from the brackets if you don't intend to run automated machine learning experiments. The `automl` extra also includes the Azure Machine Learning Data Prep SDK by default as a dependency.
183
+
This command installs the base Azure Machine Learning SDK with notebook and `automl` extras. The `automl` extra is a large install, and can be removed from the brackets if you don't intend to run automated machine learning experiments. The `automl` extra also includes the Azure Machine Learning Data Prep SDK by default as a dependency.
184
184
185
185
```shell
186
-
pip install azureml-sdk[notebooks,automl]
186
+
pip install azureml-sdk[notebooks,automl]
187
187
```
188
188
189
189
> [!NOTE]
@@ -216,7 +216,9 @@ When you're using a local computer (which might also be a remote virtual machine
216
216
217
217
Jupyter Notebooks are part of the [Jupyter Project](https://jupyter.org/). They provide an interactive coding experience where you create documents that mix live code with narrative text and graphics. Jupyter Notebooks are also a great way to share your results with others, because you can save the output of your code sections in the document. You can install Jupyter Notebooks on a variety of platforms.
218
218
219
-
The procedure in the [Local computer](#local) section installs necessary components for running Jupyter Notebooks in an Anaconda environment. To enable these components in your Jupyter Notebook environment, do the following:
219
+
The procedure in the [Local computer](#local) section installs necessary components for running Jupyter Notebooks in an Anaconda environment.
220
+
221
+
To enable these components in your Jupyter Notebook environment:
220
222
221
223
1. Open an Anaconda prompt and activate your environment.
222
224
@@ -249,15 +251,15 @@ The procedure in the [Local computer](#local) section installs necessary compone
249
251
import sys
250
252
sys.path
251
253
```
252
-
254
+
253
255
1. To configure the Jupyter Notebook to use your Azure Machine Learning workspace, go to the [Create a workspace configuration file](#workspace) section.
254
256
255
257
256
258
### <a id="vscode"></a>Visual Studio Code
257
259
258
-
Visual Studio Code is a very popular cross platform code editor that supports an extensive set of programming languages and tools through extensions available in the [Visual Studio marketplace](https://marketplace.visualstudio.com/vscode). The [Azure Machine Learning extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.vscode-ai) installs the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) for coding in all types of Python environments (virtual, Anaconda, etc). In addition, it provides convenience features for working with Azure Machine Learning resources and running Azure Machine Learning experiments all without leaving Visual Studio Code.
260
+
Visual Studio Code is a very popular cross platform code editor that supports an extensive set of programming languages and tools through extensions available in the [Visual Studio marketplace](https://marketplace.visualstudio.com/vscode). The [Azure Machine Learning extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.vscode-ai) installs the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) for coding in all types of Python environments (virtual, Anaconda, etc.). In addition, it provides convenience features for working with Azure Machine Learning resources and running Azure Machine Learning experiments all without leaving Visual Studio Code.
259
261
260
-
To use Visual Studio Code for development, do the following:
262
+
To use Visual Studio Code for development:
261
263
262
264
1. Install the Azure Machine Learning extension for Visual Studio Code, see [Azure Machine Learning](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.vscode-ai).
Copy file name to clipboardExpand all lines: articles/machine-learning/service/how-to-vscode-tools.md
+56-55Lines changed: 56 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The [Azure Machine Learning service](overview-what-is-azure-ml.md) streamlines t
28
28
+[Install Python 3.5 or later](https://www.anaconda.com/download/).
29
29
30
30
31
-
## Install Azure Machine Learning extension for Visual Studio Code
31
+
## Install the extension
32
32
33
33
When you install the Azure Machine Learning extension, two more extensions are automatically installed. They're the [Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) and the [Microsoft Python extension](https://marketplace.visualstudio.com/items?itemName=ms-Python.Python). For more information about using the Python extension for editing, running, and debugging Python code, see the [Python hello-world tutorial](https://code.visualstudio.com/docs/Python/Python-tutorial).
34
34
@@ -48,7 +48,8 @@ To install the Azure Machine Learning extension:
48
48
49
49
The Azure Account extension, which was installed along with the Azure Machine Learning for Visual Studio Code extension, helps you authenticate with your Azure account. For a list of commands, see the page for the [Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account).
50
50
51
-
> [Tip] You can also download the extension installer directly from [Azure Machine Learning for Visual Studio Code extension (preview)](https://aka.ms/vscodetoolsforai).
51
+
> [!TIP]
52
+
> You can also download the extension installer directly from [Azure Machine Learning for Visual Studio Code extension (preview)](https://aka.ms/vscodetoolsforai).
52
53
53
54
## Quickstart with Azure Machine Learning
54
55
There are multiple ways of running your training scripts using the Azure Machine Learning service. If you're just getting started, let's first walk through how to quickly submit a training script to run in Azure.
@@ -68,11 +69,11 @@ Let's get started. You can use your own training script if you have it ready, or
68
69
69
70
1. Open **train.py** and run it by opening the debugger and pressing the run button (or just press F5).
print(epoch, '-- Training accuracy:', acc_train, '\b Validation
130
-
...
131
-
```
130
+
print(epoch, '-- Training accuracy:', acc_train, '\b Validation
131
+
...
132
+
```
132
133
### Run the script in Azure
133
134
That's it! Now just use the extension to run your script in the cloud! Note that the following walkthrough video takes the liberty of compressing the amount of time it takes to create a new Azure ML workspace and compute, as well as the time it takes to run the training script.
134
135
135
-
[](./media/vscode-tools-for-ai/StartGoldenPath.gif#lightbox)
136
+
[](./media/vscode-tools-for-ai/start-golden-path.gif#lightbox)
136
137
137
138
After clicking the Run Experiment button, answer the prompts as follows:
138
139
@@ -146,12 +147,12 @@ After clicking the Run Experiment button, answer the prompts as follows:
146
147
1. Review the default names and specs for the experiment run and click the **Submit Experiment** link in the json file. The json file won't be saved as it's simply there for you to review or change the experiment settings before submission.
147
148
1. Sit back and relax while the extension sets everything up for you and runs your script!
148
149
149
-
[](./media/vscode-tools-for-ai/RunGoldenPath.gif#lightbox)
150
+
[](./media/vscode-tools-for-ai/run-golden-path.gif#lightbox)
150
151
151
152
In a few seconds, you'll be notified that the experiment has been submitted to Azure at which time you can view its progress either in the Azure portal by clicking the **View Experiment Run** link in the VS Code notification, or inside VS Code by hitting the refresh button in the Azure tab.
152
153
153
154
At the moment, viewing run metrics is only supported in the Azure portal. The **View Experiment Run** link mentioned above will take you to the run where you'll see the metrics you logged.
154
-
[](./media/vscode-tools-for-ai/ExperimentRunOnPortal.PNG#lightbox)
155
+
[](./media/vscode-tools-for-ai/experiment-run-on-portal.PNG#lightbox)
155
156
156
157
## Azure Machine Learning in-depth with VS Code
157
158
@@ -163,7 +164,7 @@ Before you start training and deploying machine learning models in Visual Studio
163
164
164
165
1. On the Visual Studio Code activity bar, select the Azure icon. The Azure Machine Learning sidebar appears.
165
166
166
-
[](./media/vscode-tools-for-ai/CreateaWorkspace.gif#lightbox)
167
+
[](./media/vscode-tools-for-ai/create-workspace.gif#lightbox)
167
168
168
169
169
170
1. Right-click your Azure subscription and select **Create Workspace**. By default a name is generated containing the date and time of creation. Change the name to **TeamWorkspace**and press enter.
@@ -185,7 +186,7 @@ One or more experiments can be created in your workspace to track and analyze in
185
186
186
187
1. In a workspace, you can right-click an experiment to set it as the **Active** experiment. The **Active** experiment links that experiment in the cloud to the folder you currently have openin Visual Studio Code. This folder should contain your local Python scripts. By setting an active experiment, key metrics forall training runs will be stored within the experiment, regardless of where they're executed.
187
188
188
-
[](./media/vscode-tools-for-ai/CreateAnExperiment.gif#lightbox)
189
+
[](./media/vscode-tools-for-ai/create-experiment.gif#lightbox)
189
190
190
191
191
192
### Create and manage compute targets
@@ -216,15 +217,15 @@ To create a compute target:
216
217
217
218
Here's an example of how to create and edit an Azure Machine Learning compute (AMLCompute):
218
219
219
-
[](./media/vscode-tools-for-ai/CreateARemoteCompute.gif#lightbox)
220
+
[](./media/vscode-tools-for-ai/create-remote-compute.gif#lightbox)
220
221
221
222
#### The run configuration file
222
223
223
224
To run an Azure Machine Learning experiment on a compute, that compute needs to be configured appropriately. A run configuration fileis the mechanism by which this environment is specified.
224
225
225
226
Here's an example of how to create a run configuration for the AmlCompute, created above.
226
227
227
-
[](./media/vscode-tools-for-ai/CreateARunConfig.gif#lightbox)
228
+
[](./media/vscode-tools-for-ai/create-runconfig.gif#lightbox)
228
229
229
230
To run Azure ML experiments on your local machine a run configuration fileis still required. When creating a local run configuration the Python environment used will default to the path to the interpreter you have set within VS Code.
230
231
@@ -253,12 +254,12 @@ To run an Azure Machine Learning experiment:
253
254
254
255
Here's an example of how to run an experiment on the compute previously created:
255
256
256
-
[](./media/vscode-tools-for-ai/RunExperiment.gif#lightbox)
257
+
[](./media/vscode-tools-for-ai/run-experiment.gif#lightbox)
257
258
258
259
### Deploy and manage models
259
260
In Azure Machine Learning, you can deploy and manage your machine learning models in the cloud and at the edge.
260
261
261
-
### 1. Register your model to Azure Machine Learning from Visual Studio Code
262
+
#### Register your model to Azure Machine Learning from Visual Studio Code
262
263
263
264
Now that you've trained your model, you can register it in your workspace. You can track and deploy registered models.
264
265
@@ -280,10 +281,10 @@ To register your model:
280
281
281
282
Here's an example of how to register your model to Azure Machine Learning:
282
283
283
-
[](./media/vscode-tools-for-ai/RegisteringAModel.gif#lightbox)
284
+
[](./media/vscode-tools-for-ai/register-model.gif#lightbox)
284
285
285
286
286
-
### 2. Deploy your service from Visual Studio Code
287
+
#### Deploy your service from Visual Studio Code
287
288
288
289
In Visual Studio Code, you can deploy your web service to:
289
290
+ Azure Container Instances (ACI) for testing.
@@ -315,11 +316,11 @@ The web service is now deployed.
315
316
316
317
Here's an example of how to deploy a web service:
317
318
318
-
[](./media/vscode-tools-for-ai/CreatingAnImage.gif#lightbox)
319
+
[](./media/vscode-tools-for-ai/create-image.gif#lightbox)
319
320
320
-
### Use keyboard shortcuts
321
+
### Experiment with additional features
321
322
322
-
You can use the keyboard to access Azure Machine Learning features in Visual Studio Code. The most important keyboard shortcut to know isCtrl+Shift+P, which displays the command palette. From the command palette, you have access to all of the functionality of Visual Studio Code, including keyboard shortcuts forthe most common operations.
323
+
You can use the Command Palette to access many Azure Machine Learning features in Visual Studio Code. To invoke the Command Palette typeCtrl+Shift+P. From here, you can search for additional Azure ML features of the extension.
323
324
324
325
[](./media/vscode-tools-for-ai/commands.gif#lightbox)
0 commit comments