Skip to content

Commit d07c172

Browse files
committed
Merge branch 'hubworkspaces' of github.com:deeikele/azure-docs-pr into hub-workspace
2 parents ddd8585 + ea814bc commit d07c172

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

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

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,31 @@ You can create a workspace [directly in Azure Machine Learning studio](./quickst
7070

7171
[!INCLUDE [sdk v2](includes/machine-learning-sdk-v2.md)]
7272

73-
* **Default specification.** By default, dependent resources and the resource group are created automatically. This code creates a workspace named `myworkspace`, and a resource group named `myresourcegroup` in `eastus2`.
73+
* **Basic configuration for getting started** Without specification, [associated resources](concept-workspace.md#associated-resources) and the Azure resource group are created automatically. This code creates a workspace named `myworkspace`, dependent Azure resources (Storage account, Key Vault, Container Registry, Application Insights), and a resource group named `myresourcegroup` in `eastus2`.
7474

7575
[!notebook-python[](~/azureml-examples-main/sdk/python/resources/workspace/workspace.ipynb?name=basic_workspace_name)]
7676

77-
* **Use existing Azure resources**. You can also create a workspace that uses existing Azure resources with the Azure resource ID format. Find the specific Azure resource IDs in the Azure portal, or with the SDK. This example assumes that the resource group, storage account, key vault, App Insights, and container registry already exist.
77+
* **Use existing Azure resources**. To bring existing Azure resources, reference them using the Azure resource ID format. Find the specific Azure resource IDs in the Azure portal, or with the SDK. This example assumes that the resource group, Storage account, Key Vault, Application Insights, and Container Registry already exist.
7878

7979
[!notebook-python[](~/azureml-examples-main/sdk/python/resources/workspace/workspace.ipynb?name=basic_ex_workspace_name)]
8080

81+
* **(Preview) Use existing hub workspace**. Instead of creating a default workspace with its own security settings and [associated resources](concept-workspace.md#associated-resources), you can reuse a [hub workspace](concept-hub-workspace.md)'s shared environment. Your new 'project' workspace will obtain security settings and shared configurations from the hub including compute and connections. This example assumes that the hub workspace already exists.
82+
83+
```python
84+
from azure.ai.ml.entities import Project
85+
86+
my_project_name = "myexampleproject"
87+
my_location = "East US"
88+
my_display_name = "My Example Project"
89+
90+
my_hub = Project(name=my_hub_name,
91+
location=my_location,
92+
display_name=my_display_name,
93+
hub_id=created_hub.id)
94+
95+
created_project_workspace = ml_client.workspaces.begin_create(workspace=my_hub).result()
96+
```
97+
8198
For more information, see [Workspace SDK reference](/python/api/azure-ai-ml/azure.ai.ml.entities.workspace).
8299

83100
If you have problems in accessing your subscription, see [Set up authentication for Azure Machine Learning resources and workflows](how-to-setup-authentication.md), and the [Authentication in Azure Machine Learning](https://aka.ms/aml-notebook-auth) notebook.

0 commit comments

Comments
 (0)