Skip to content

Commit ab5d681

Browse files
authored
Merge pull request #180115 from Blackmist/1879094-diagnostic-api
documenting workspace diagnostis
2 parents 36db950 + 35f562c commit ab5d681

File tree

7 files changed

+93
-8
lines changed

7 files changed

+93
-8
lines changed

articles/machine-learning/how-to-create-workspace-template.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,4 +653,5 @@ To avoid this problem, we recommend one of the following approaches:
653653
654654
* [Deploy resources with Resource Manager templates and Resource Manager REST API](../azure-resource-manager/templates/deploy-rest.md).
655655
* [Creating and deploying Azure resource groups through Visual Studio](../azure-resource-manager/templates/create-visual-studio-deployment-project.md).
656-
* [For other templates related to Azure Machine Learning, see the Azure Quickstart Templates repository](https://github.com/Azure/azure-quickstart-templates)
656+
* [For other templates related to Azure Machine Learning, see the Azure Quickstart Templates repository](https://github.com/Azure/azure-quickstart-templates).
657+
* To check for problems with your workspace, see [How to use workspace diagnostics](how-to-workspace-diagnostic-api.md).

articles/machine-learning/how-to-manage-workspace-cli.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,4 +392,6 @@ The Azure Machine Learning workspace uses Azure Container Registry (ACR) for som
392392

393393
## Next steps
394394

395-
For more information on the Azure CLI extension for machine learning, see the [az ml](/cli/azure/ml) documentation.
395+
For more information on the Azure CLI extension for machine learning, see the [az ml](/cli/azure/ml) documentation.
396+
397+
To check for problems with your workspace, see [How to use workspace diagnostics](how-to-workspace-diagnostic-api.md).

articles/machine-learning/how-to-manage-workspace.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,4 +399,6 @@ Examples of creating a workspace:
399399

400400
Once you have a workspace, learn how to [Train and deploy a model](tutorial-train-models-with-aml.md).
401401

402-
To learn more about planning a workspace for your organization's requirements, see [Organize and set up Azure Machine Learning](/azure/cloud-adoption-framework/ready/azure-best-practices/ai-machine-learning-resource-organization).
402+
To learn more about planning a workspace for your organization's requirements, see [Organize and set up Azure Machine Learning](/azure/cloud-adoption-framework/ready/azure-best-practices/ai-machine-learning-resource-organization).
403+
404+
To check for problems with your workspace, see [How to use workspace diagnostics](how-to-workspace-diagnostic-api.md).
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: Workspace diagnostics
3+
titleSuffix: Azure Machine Learning
4+
description: Learn how to use Azure Machine Learning workspace diagnostics in the Azure portal or with the Python SDK.
5+
services: machine-learning
6+
ms.service: machine-learning
7+
ms.subservice: enterprise-readiness
8+
ms.author: jhirono
9+
author: jhirono
10+
ms.reviewer: larryfr
11+
ms.date: 11/18/2021
12+
ms.topic: how-to
13+
14+
---
15+
16+
# How to use workspace diagnostics
17+
18+
Azure Machine Learning provides a diagnostic API that can be used to identify problems with your workspace. Errors returned in the diagnostics report include information on how to resolve the problem.
19+
20+
You can use the workspace diagnostics from the Azure Machine Learning studio or Python SDK.
21+
22+
## Prerequisites
23+
24+
* An Azure Machine learning workspace. If you don't have one, see [Create a workspace](quickstart-create-resources.md).
25+
* The [Azure Machine Learning SDK for Python](/python/api/overview/azure/ml).
26+
## Diagnostics from studio
27+
28+
From [Azure Machine Learning studio](https://ml.azure.com) or the Python SDK, you can run diagnostics on your workspace to check your setup. To run diagnostics, select the '__?__' icon from the upper right corner of the page. Then select __Run workspace diagnostics__.
29+
30+
:::image type="content" source="./media/how-to-workspace-diagnostic-api/diagnostics.png" alt-text="Screenshot of the workspace diagnostics button":::
31+
32+
After diagnostics run, a list of any detected problems is returned. This list includes links to possible solutions.
33+
34+
## Diagnostics from Python
35+
36+
The following snippet demonstrates how to use workspace diagnostics from Python
37+
38+
```python
39+
from azureml.core import Workspace
40+
41+
ws = Workspace.from_config()
42+
43+
diag_param = {
44+
"value": {
45+
}
46+
}
47+
48+
resp = ws.diagnose_workspace(diag_param)
49+
print(resp)
50+
```
51+
52+
The response is a JSON document that contains information on any problems detected with the workspace. The following JSON is an example response:
53+
54+
```json
55+
{
56+
'value': {
57+
'user_defined_route_results': [],
58+
'network_security_rule_results': [],
59+
'resource_lock_results': [],
60+
'dns_resolution_results': [{
61+
'code': 'CustomDnsInUse',
62+
'level': 'Warning',
63+
'message': "It is detected VNet '/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/virtualNetworks/<virtual-network-name>' of private endpoint '/subscriptions/<subscription-id>/resourceGroups/larrygroup0916/providers/Microsoft.Network/privateEndpoints/<workspace-private-endpoint>' is not using Azure default dns. You need to configure your DNS server and check https://docs.microsoft.com/azure/machine-learning/how-to-custom-dns to make sure the custom dns is set up correctly."
64+
}],
65+
'storage_account_results': [],
66+
'key_vault_results': [],
67+
'container_registry_results': [],
68+
'application_insights_results': [],
69+
'other_results': []
70+
}
71+
}
72+
```
73+
74+
If no problems are detected, an empty JSON document is returned.
75+
76+
For more information, see the [Workspace.diagnose_workspace()](/python/api/azureml-core/azureml.core.workspace(class)#diagnose-workspace-diagnose-parameters-) reference.
77+
78+
## Next steps
79+
80+
* [Workspace.diagnose_workspace()](/python/api/azureml-core/azureml.core.workspace(class)#diagnose-workspace-diagnose-parameters-)
81+
* [How to manage workspaces in portal or SDK](how-to-manage-workspace.md)

articles/machine-learning/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@
299299
href: how-to-manage-rest.md
300300
- name: Link to Azure Synapse Analytics workspace
301301
href: how-to-link-synapse-ml-workspaces.md
302+
- name: Workspace Diagnostics
303+
href: how-to-workspace-diagnostic-api.md
302304
- name: Create & manage compute resources
303305
items:
304306
- name: Compute instance

includes/machine-learning-workspace-diagnostics.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
author: Blackmist
33
ms.service: machine-learning
44
ms.topic: include
5-
ms.date: 08/12/2021
5+
ms.date: 11/16/2021
66
ms.author: larryfr
77
---
88

9-
From [Azure Machine Learning studio](https://ml.azure.com), you can run diagnostics on your workspace to check your setup. To run diagnostics, select the '__?__' icon from the upper right corner of the page. Then select __Run workspace diagnostics__.
9+
You can run diagnostics on your workspace from Azure Machine Learning studio or the Python SDK. After diagnostics run, a list of any detected problems is returned. This list includes links to possible solutions. For more information, see [How to use workspace diagnostics](/azure/machine-learning/how-to-workspace-diagnostic-api).
1010

11-
:::image type="content" source="./media/machine-learning-workspace-diagnostics/diagnostics.png" alt-text="Screenshot of the workspace diagnostics button":::
12-
13-
After diagnostics run, a list of any detected problems is returned. This list includes links to possible solutions.

0 commit comments

Comments
 (0)