|
| 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/16/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 | +## Diagnostics from studio |
| 23 | + |
| 24 | +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__. |
| 25 | + |
| 26 | +:::image type="content" source="./media/machine-learning-workspace-diagnostics/diagnostics.png" alt-text="Screenshot of the workspace diagnostics button"::: |
| 27 | + |
| 28 | +After diagnostics run, a list of any detected problems is returned. This list includes links to possible solutions. |
| 29 | + |
| 30 | +## Diagnostics from Python |
| 31 | + |
| 32 | +The following snippet demonstrates how to use the |
| 33 | +```python |
| 34 | +from azureml.core import Workspace |
| 35 | + |
| 36 | +ws = Workspace.from_config() |
| 37 | + |
| 38 | +diag_param = { |
| 39 | + "value": { |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | +resp = ws.diagnose_workspace(diag_param) |
| 44 | +print(resp) |
| 45 | +``` |
| 46 | + |
| 47 | +The response is a JSON document that contains information on any problems detected with the workspace. The following JSON is an example response: |
| 48 | + |
| 49 | +```json |
| 50 | +{ |
| 51 | + 'value': { |
| 52 | + 'user_defined_route_results': [], |
| 53 | + 'network_security_rule_results': [], |
| 54 | + 'resource_lock_results': [], |
| 55 | + 'dns_resolution_results': [{ |
| 56 | + 'code': 'CustomDnsInUse', |
| 57 | + 'level': 'Warning', |
| 58 | + '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." |
| 59 | + }], |
| 60 | + 'storage_account_results': [], |
| 61 | + 'key_vault_results': [], |
| 62 | + 'container_registry_results': [], |
| 63 | + 'application_insights_results': [], |
| 64 | + 'other_results': [] |
| 65 | + } |
| 66 | +} |
| 67 | +``` |
| 68 | + |
| 69 | +If no problems are detected, an empty JSON document is returned. |
| 70 | + |
| 71 | +For more information, see the [Workspace.diagnose_workspace()](/python/api/azureml-core/azureml.core.workspace(class)#diagnose-workspace-diagnose-parameters-) reference. |
| 72 | + |
| 73 | +## Next steps |
| 74 | + |
| 75 | +* [Workspace.diagnose_workspace()](/python/api/azureml-core/azureml.core.workspace(class)#diagnose-workspace-diagnose-parameters-) |
| 76 | +* [How to manage workspaces in portal or SDK](how-to-manage-workspace.md) |
0 commit comments