Skip to content

Commit 69c8db0

Browse files
committed
Incorporate feedback
1 parent 66908af commit 69c8db0

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

articles/machine-learning/how-to-debug-managed-online-endpoints-visual-studio-code.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ ms.devlang: azurecli
1919

2020
[!INCLUDE [dev v2](includes/machine-learning-dev-v2.md)]
2121

22-
Learn how to use the Visual Studio Code (VS Code) debugger to test and debug online endpoints locally before deploying them to Azure.
22+
Learn how to use the Microsoft Visual Studio Code debugger to test and debug online endpoints locally before deploying them to Azure.
2323

2424
Azure Machine Learning local endpoints help you test and debug your scoring script, environment configuration, code configuration, and machine learning model locally.
2525

2626
[!INCLUDE [machine-learning-preview-generic-disclaimer](includes/machine-learning-preview-generic-disclaimer.md)]
2727

28-
## Online endpoint local debugging
29-
30-
Debugging endpoints locally before deploying them to the cloud can help you catch errors in your code and configuration earlier. You have different options for debugging endpoints locally with VS Code.
28+
Debugging endpoints locally before deploying them to the cloud can help you catch errors in your code and configuration earlier. You have different options for debugging endpoints locally with Visual Studio Code.
3129

3230
- [Azure Machine Learning inference HTTP server](how-to-inference-server-http.md)
3331
- Local endpoint
@@ -41,7 +39,7 @@ The following table provides an overview of scenarios to help you choose what wo
4139
| Update local Python environment, **without** Docker image rebuild | Yes | No |
4240
| Update scoring script | Yes | Yes |
4341
| Update deployment configurations (deployment, environment, code, model) | No | Yes |
44-
| VS Code debugger integration | Yes | Yes |
42+
| Visual Studio Code debugger integration | Yes | Yes |
4543

4644
## Prerequisites
4745

@@ -50,7 +48,7 @@ The following table provides an overview of scenarios to help you choose what wo
5048
This guide assumes you have the following items installed locally on your PC.
5149

5250
- [Docker](https://docs.docker.com/engine/install/)
53-
- [VS Code](https://code.visualstudio.com/#alt-downloads)
51+
- [Visual Studio Code](https://code.visualstudio.com/#alt-downloads)
5452
- [Azure CLI](/cli/azure/install-azure-cli)
5553
- [Azure CLI ml extension (v2)](how-to-configure-cli.md)
5654

@@ -85,7 +83,7 @@ az configure --defaults workspace=<workspace> group=<resource-group> location=<l
8583
This guide assumes you have the following items installed locally on your PC.
8684

8785
- [Docker](https://docs.docker.com/engine/install/)
88-
- [VS Code](https://code.visualstudio.com/#alt-downloads)
86+
- [Visual Studio Code](https://code.visualstudio.com/#alt-downloads)
8987
- [Azure CLI](/cli/azure/install-azure-cli)
9088
- [Azure CLI ml extension (v2)](how-to-configure-cli.md)
9189
- [Azure Machine Learning Python SDK (v2)](https://aka.ms/sdk-v2-install)
@@ -131,37 +129,37 @@ endpoint_name = "<ENDPOINT_NAME>"
131129

132130
# [Azure CLI](#tab/cli)
133131

134-
Azure Machine Learning local endpoints use Docker and VS Code development containers (dev containers) to build and configure a local debugging environment. With dev containers, you can take advantage of VS Code features from inside a Docker container. For more information on dev containers, see [Create a development container](https://code.visualstudio.com/docs/remote/create-dev-container).
132+
Azure Machine Learning local endpoints use Docker and Visual Studio Code development containers (dev containers) to build and configure a local debugging environment. With dev containers, you can take advantage of Visual Studio Code features from inside a Docker container. For more information on dev containers, see [Create a development container](https://code.visualstudio.com/docs/remote/create-dev-container).
135133

136-
To debug online endpoints locally in VS Code, use the `--vscode-debug` flag when creating or updating and Azure Machine Learning online deployment. The following command uses a deployment example from the examples repo:
134+
To debug online endpoints locally in Visual Studio Code, use the `--vscode-debug` flag when creating or updating and Azure Machine Learning online deployment. The following command uses a deployment example from the examples repo:
137135

138136
```azurecli
139137
az ml online-deployment create --file endpoints/online/managed/sample/blue-deployment.yml --local --vscode-debug
140138
```
141139

142140
> [!IMPORTANT]
143-
> On Windows Subsystem for Linux (WSL), you'll need to update your PATH environment variable to include the path to the VS Code executable or use WSL interop. For more information, see [Windows interoperability with Linux](/windows/wsl/interop).
141+
> On Windows Subsystem for Linux (WSL), you'll need to update your PATH environment variable to include the path to the Visual Studio Code executable or use WSL interop. For more information, see [Windows interoperability with Linux](/windows/wsl/interop).
144142
145143
A Docker image is built locally. Any environment configuration or model file errors are surfaced at this stage of the process.
146144

147145
> [!NOTE]
148146
> The first time you launch a new or updated dev container, it can take several minutes.
149147
150-
Once the image successfully builds, your dev container opens in a VS Code window.
148+
Once the image successfully builds, your dev container opens in a Visual Studio Code window.
151149

152-
You'll use a few VS Code extensions to debug your deployments in the dev container. Azure Machine Learning automatically installs these extensions in your dev container.
150+
You'll use a few Visual Studio Code extensions to debug your deployments in the dev container. Azure Machine Learning automatically installs these extensions in your dev container.
153151

154152
- Inference Debug
155153
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
156154
- [Jupyter](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
157155
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
158156

159157
> [!IMPORTANT]
160-
> Before starting your debug session, make sure that the VS Code extensions have finished installing in your dev container.
158+
> Before starting your debug session, make sure that the Visual Studio Code extensions have finished installing in your dev container.
161159
162160
# [Python](#tab/python)
163161

164-
Azure Machine Learning local endpoints use Docker and VS Code development containers (dev containers) to build and configure a local debugging environment. With dev containers, you can take advantage of VS Code features from inside a Docker container. For more information on dev containers, see [Create a development container](https://code.visualstudio.com/docs/remote/create-dev-container).
162+
Azure Machine Learning local endpoints use Docker and Visual Studio Code development containers (dev containers) to build and configure a local debugging environment. With dev containers, you can take advantage of Visual Studio Code features from inside a Docker container. For more information on dev containers, see [Create a development container](https://code.visualstudio.com/docs/remote/create-dev-container).
165163

166164
Get a handle to the workspace:
167165

@@ -175,37 +173,37 @@ ml_client = MLClient(
175173
)
176174
```
177175

178-
To debug online endpoints locally in VS Code, set the `vscode-debug` and `local` flags when creating or updating an Azure Machine Learning online deployment. The following code mirrors a deployment example from the examples repo:
176+
To debug online endpoints locally in Visual Studio Code, set the `vscode-debug` and `local` flags when creating or updating an Azure Machine Learning online deployment. The following code mirrors a deployment example from the examples repo:
179177

180178
[!notebook-python[] (~/azureml-examples-main/sdk/python/endpoints/online/managed/debug-online-endpoints-locally-in-visual-studio-code.ipynb?name=launch-container-4)]
181179

182180
> [!IMPORTANT]
183-
> On Windows Subsystem for Linux (WSL), you'll need to update your PATH environment variable to include the path to the VS Code executable or use WSL interop. For more information, see [Windows interoperability with Linux](/windows/wsl/interop).
181+
> On Windows Subsystem for Linux (WSL), you'll need to update your PATH environment variable to include the path to the Visual Studio Code executable or use WSL interop. For more information, see [Windows interoperability with Linux](/windows/wsl/interop).
184182
185183
A Docker image is built locally. Any environment configuration or model file errors are surfaced at this stage of the process.
186184

187185
> [!NOTE]
188186
> It can take several minutes to launch a new or updated dev container for the first time.
189187
190-
Once the image successfully builds, your dev container opens in a VS Code window.
188+
Once the image successfully builds, your dev container opens in a Visual Studio Code window.
191189

192-
You'll use a few VS Code extensions to debug your deployments in the dev container. Azure Machine Learning automatically installs these extensions in your dev container.
190+
You'll use a few Visual Studio Code extensions to debug your deployments in the dev container. Azure Machine Learning automatically installs these extensions in your dev container.
193191

194192
- Inference Debug
195193
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
196194
- [Jupyter](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
197195
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
198196

199197
> [!IMPORTANT]
200-
> Before starting your debug session, make sure that the VS Code extensions have finished installing in your dev container.
198+
> Before starting your debug session, make sure that the Visual Studio Code extensions have finished installing in your dev container.
201199
202200
---
203201

204202
## Start debug session
205203

206-
Once your environment is set up, use the VS Code debugger to test and debug your deployment locally.
204+
Once your environment is set up, use the Visual Studio Code debugger to test and debug your deployment locally.
207205

208-
1. Open your scoring script in VS Code.
206+
1. Open your scoring script in Visual Studio Code.
209207

210208
> [!TIP]
211209
> The *score.py* script used by the endpoint deployed earlier is located at *azureml-samples/cli/endpoints/online/managed/sample/score.py* in the repository you cloned. However, the steps in this guide work with any scoring script.
@@ -215,7 +213,7 @@ Once your environment is set up, use the VS Code debugger to test and debug your
215213
- To debug startup behavior, place your breakpoint(s) inside the `init` function.
216214
- To debug scoring behavior, place your breakpoint(s) inside the `run` function.
217215

218-
1. Select the VS Code Job view.
216+
1. Select the Visual Studio Code Job view.
219217

220218
1. In the **Run and Debug** dropdown, select **AzureML: Debug Local Endpoint** to start debugging your endpoint locally.
221219

@@ -230,7 +228,7 @@ Once your environment is set up, use the VS Code debugger to test and debug your
230228

231229
At this point, any breakpoints in your `init` function are caught. Use the debug actions to step through your code. For more information on debug actions, see the [debug actions guide](https://code.visualstudio.com/Docs/editor/debugging#_debug-actions).
232230

233-
For more information on the VS Code debugger, see [Debugging in VS Code](https://code.visualstudio.com/Docs/editor/debugging).
231+
For more information on the Visual Studio Code debugger, see [Debugging](https://code.visualstudio.com/Docs/editor/debugging).
234232

235233
## Debug your endpoint
236234

@@ -352,7 +350,7 @@ For more extensive changes involving updates to your environment and endpoint co
352350
az ml online-deployment update --file <DEPLOYMENT-YAML-SPECIFICATION-FILE> --local --vscode-debug
353351
```
354352
355-
Once the updated image is built and your development container launches, use the VS Code debugger to test and troubleshoot your updated endpoint.
353+
Once the updated image is built and your development container launches, use the Visual Studio Code debugger to test and troubleshoot your updated endpoint.
356354
357355
# [Python](#tab/python)
358356
@@ -370,7 +368,7 @@ For more extensive changes involving updates to your environment and endpoint co
370368
371369
[!notebook-python[] (~/azureml-examples-main/sdk/python/endpoints/online/managed/debug-online-endpoints-locally-in-visual-studio-code.ipynb?name=edit-endpoint-1)]
372370
373-
Once the updated image is built and your development container launches, use the VS Code debugger to test and troubleshoot your updated endpoint.
371+
Once the updated image is built and your development container launches, use the Visual Studio Code debugger to test and troubleshoot your updated endpoint.
374372
375373
---
376374

0 commit comments

Comments
 (0)