You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/includes/create-project-fdp.md
+17-63Lines changed: 17 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,6 @@ ms.custom:
29
29
* Fine-tuning
30
30
* Playgrounds
31
31
32
-
33
32
## Prerequisites
34
33
35
34
Use the following tabs to select the method you plan to use to create a [!INCLUDE [fdp](../includes/fdp-project-name.md)]:
@@ -49,23 +48,23 @@ Use the following tabs to select the method you plan to use to create a [!INCLUD
49
48
- Complete these steps to start your Python script:
50
49
1. Install packages: `pip install azure-identity azure-mgmt-cognitiveservices`. If in a notebook cell, use `%pip install azure-identity azure-mgmt-cognitiveservices`.
51
50
1. Use `pip show azure-mgmt-cognitiveservices` to verify your version is 13.7 or greater.
52
-
1. Start your script with the following code to create the `client` connection and variables used throughout this article. This example creates the project in West US:
51
+
1. Start your script with the following code to create the `client` connection and variables used throughout this article. This example creates the project in East US:
1. (Optional) If you have multiple accounts, add the tenant ID of the Microsoft Entra ID you wish to use into the `DefaultAzureCredential`. Find your tenant ID from the [Azure portal](https://portal.azure.com) under **Microsoft Entra ID, External Identities**.
56
+
54
57
```python
55
-
from azure.identity import DefaultAzureCredential
56
-
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
1. (Optional) If you're working on in the [Azure Government - US](/azure/azure-government/documentation-government-welcome) or [Azure China 21Vianet](https://azure.microsoft.com/global-infrastructure/services/?regions=china-east-2%2cchina-non-regional&products=all) regions, specify the region into which you want to authenticate. You can specify the region with `DefaultAzureCredential`. The following example authenticates to the Azure Government - US region:
@@ -120,44 +119,7 @@ To create a [!INCLUDE [fdp](../includes/fdp-project-name.md)]:
120
119
121
120
1. Add this code to create a [!INCLUDE [fdp-project-name](../includes/fdp-project-name.md)], using the variables and`client` connection from the [Prerequisites](#prerequisites).
122
121
123
-
```python
124
-
125
-
# Create resource
126
-
resource= client.accounts.begin_create(
127
-
resource_group_name=rgp,
128
-
account_name=resource_name,
129
-
account={
130
-
"location": location,
131
-
"kind": "AIServices",
132
-
"sku": {"name": "S0",},
133
-
"identity": {"type": "SystemAssigned"},
134
-
"properties": {"allowProjectManagement": True}
135
-
}
136
-
)
137
-
# Create default project
138
-
project= client.projects.begin_create(
139
-
resource_group_name=rgp,
140
-
account_name=resource_name,
141
-
project_name=project_name,
142
-
project={
143
-
"location": location,
144
-
"identity": {"type": "SystemAssigned"},
145
-
"properties": {}
146
-
}
147
-
)
148
-
```
149
-
1. (Optional) If you have multiple accounts, add the tenant ID of the Microsoft Entra ID you wish to use into the `DefaultAzureCredential`. Find your tenant IDfrom the [Azure portal](https://portal.azure.com) under **Microsoft Entra ID, External Identities**.
1. (Optional) If you're working on in the [Azure Government - US](/azure/azure-government/documentation-government-welcome) or [Azure China 21Vianet](https://azure.microsoft.com/global-infrastructure/services/?regions=china-east-2%2cchina-non-regional&products=all) regions, specify the region into which you want to authenticate. You can specify the region with `DefaultAzureCredential`. The following example authenticates to the Azure Government - US region:
0 commit comments