Skip to content

Commit 7f3a1cd

Browse files
committed
Remove blank lines
1 parent 35b09a3 commit 7f3a1cd

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,21 +185,18 @@ endpoint_name = "<ENDPOINT_NAME>"
185185
Get a handle to the workspace:
186186

187187
```python
188-
189188
credential = AzureCliCredential()
190189
ml_client = MLClient(
191190
credential,
192191
subscription_id=subscription_id,
193192
resource_group_name=resource_group,
194193
workspace_name=workspace_name,
195194
)
196-
197195
```
198196

199197
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:
200198

201199
```python
202-
203200
deployment = ManagedOnlineDeployment(
204201
name="blue",
205202
endpoint_name=endpoint_name,
@@ -220,7 +217,6 @@ deployment = ml_client.online_deployments.begin_create_or_update(
220217
local=True,
221218
vscode_debug=True,
222219
)
223-
224220
```
225221

226222
> [!IMPORTANT]
@@ -335,13 +331,11 @@ Now that your application is running in the debugger, try making a prediction to
335331
Use the`invoke` method on your `MLClient` object to make a request to your local endpoint.
336332
337333
```python
338-
339334
endpoint = ml_client.online_endpoints.get(name=endpoint_name, local=True)
340335
341336
request_file_path = "../model-1/sample-request.json"
342337
343338
endpoint.invoke(endpoint_name, request_file_path, local=True)
344-
345339
```
346340
347341
In this case, `<REQUEST-FILE>` is a JSON file that contains input data samples for the model to make predictions on similar to the following JSON:
@@ -422,7 +416,6 @@ To apply changes to your code:
422416
For more extensive changes involving updates to your environment and endpoint configuration, use the `ml` extension `update` command. Doing so will trigger a full image rebuild with your changes.
423417
424418
```python
425-
426419
new_deployment = ManagedOnlineDeployment(
427420
name="green",
428421
endpoint_name=endpoint_name,
@@ -439,7 +432,6 @@ new_deployment = ManagedOnlineDeployment(
439432
)
440433
441434
ml_client.online_deployments.update(new_deployment, local=True, vscode_debug=True)
442-
443435
```
444436
445437
Once the updated image is built and your development container launches, use the VS Code debugger to test and troubleshoot your updated endpoint.

0 commit comments

Comments
 (0)