Skip to content

Commit 7b2b258

Browse files
committed
fix variable names; add hub_id for full path to the hub
1 parent 293ffcc commit 7b2b258

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

articles/ai-studio/how-to/create-projects.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,17 @@ Use the following tabs to select the method you plan to use to create a project:
3737

3838
```Python
3939
from azure.ai.ml.entities import Project
40-
40+
4141
my_project_name = "myexampleproject"
42-
my_location = "East US"
4342
my_display_name = "My Example Project"
44-
hub_id = "" # Azure resource manager ID of the hub
45-
46-
my_project = Project(name=my_hub_name,
47-
location=my_location,
43+
hub_name = "myhubname" # Azure resource manager ID of the hub
44+
hub_id=f"/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.MachineLearningServices/workspaces/{hub_name}"
45+
46+
my_project = Project(name=my_project_name,
4847
display_name=my_display_name,
49-
hub_id=created_hub.id)
50-
51-
created_project = ml_client.workspaces.begin_create(workspace=my_hub).result()
48+
hub_id=hub_id)
49+
50+
created_project = ml_client.workspaces.begin_create(workspace=my_project).result()
5251
```
5352

5453
# [Azure CLI](#tab/azurecli)

0 commit comments

Comments
 (0)