Skip to content

Commit 9642d38

Browse files
committed
Merge remote-tracking branch 'origin' into 2898-joe
2 parents 26ee686 + 93a8572 commit 9642d38

File tree

560 files changed

+7865
-8958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

560 files changed

+7865
-8958
lines changed

.openpublishing.redirection.json

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,70 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "articles/genomics/frequently-asked-questions-genomics.yml",
5+
"redirect_url": "/previous-versions/azure/genomics/frequently-asked-questions-genomics",
6+
"redirect_document_id": false
7+
},
8+
{
9+
"source_path": "articles/genomics/index.yml",
10+
"redirect_url": "/previous-versions/azure/genomics/index",
11+
"redirect_document_id": false
12+
},
13+
{
14+
"source_path": "articles/genomics/business-continuity-genomics.md",
15+
"redirect_url": "/previous-versions/azure/genomics/business-continuity-genomics",
16+
"redirect_document_id": false
17+
},
18+
{
19+
"source_path": "articles/genomics/file-support-ticket-genomics.md",
20+
"redirect_url": "/previous-versions/azure/genomics/file-support-ticket-genomics",
21+
"redirect_document_id": false
22+
},
23+
{
24+
"source_path": "articles/genomics/overview-what-is-genomics.md",
25+
"redirect_url": "/previous-versions/azure/genomics/overview-what-is-genomics",
26+
"redirect_document_id": false
27+
},
28+
{
29+
"source_path": "articles/genomics/quickstart-input-bam.md",
30+
"redirect_url": "/previous-versions/azure/genomics/quickstart-input-bam",
31+
"redirect_document_id": false
32+
},
33+
{
34+
"source_path": "articles/genomics/quickstart-input-multiple.md",
35+
"redirect_url": "/previous-versions/azure/genomics/quickstart-input-multiple",
36+
"redirect_document_id": false
37+
},
38+
{
39+
"source_path": "articles/genomics/quickstart-input-pair-fastq.md",
40+
"redirect_url": "/previous-versions/azure/genomics/quickstart-input-pair-fastq",
41+
"redirect_document_id": false
42+
},
43+
{
44+
"source_path": "articles/genomics/quickstart-input-sas.md",
45+
"redirect_url": "/previous-versions/azure/genomics/quickstart-input-sas",
46+
"redirect_document_id": false
47+
},
48+
{
49+
"source_path": "articles/genomics/quickstart-run-genomics-workflow-portal.md",
50+
"redirect_url": "/previous-versions/azure/genomics/quickstart-run-genomics-workflow-portal",
51+
"redirect_document_id": false
52+
},
53+
{
54+
"source_path": "articles/genomics/troubleshooting-guide-genomics.md",
55+
"redirect_url": "/previous-versions/azure/genomics/troubleshooting-guide-genomics",
56+
"redirect_document_id": false
57+
},
58+
{
59+
"source_path": "articles/genomics/version-release-history-genomics.md",
60+
"redirect_url": "/previous-versions/azure/genomics/version-release-history-genomics",
61+
"redirect_document_id": false
62+
},
63+
{
64+
"source_path_from_root": "/articles/ai-studio/concepts/what-are-ai-services.md",
65+
"redirect_url": "/azure/ai-services/what-are-ai-services",
66+
"redirect_document_id": false
67+
},
368
{
469
"source_path_from_root": "/articles/ai-services/openai/concepts/use-your-image-data.md",
570
"redirect_url": "/azure/ai-services/openai/concepts/use-your-data",
@@ -164,6 +229,16 @@
164229
"source_path_from_root": "/articles/ai-services/openai/references/azure-machine-learning.md",
165230
"redirect_url": "/azure/ai-services/openai/concepts/use-your-data",
166231
"redirect_document_id": false
232+
},
233+
{
234+
"source_path_from_root": "/articles/open-datasets/dataset-covid-19-open-research.md",
235+
"redirect_url": "/azure/open-datasets/dataset-catalog",
236+
"redirect_document_id": false
237+
},
238+
{
239+
"source_path_from_root": "/articles/open-datasets/dataset-genomics-data-lake.md",
240+
"redirect_url": "/azure/open-datasets/dataset-catalog",
241+
"redirect_document_id": false
167242
}
168243
]
169-
}
244+
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cSpell.words": [
3+
"DALL"
4+
]
5+
}

.whatsnew.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "https://whatsnewapi.azurewebsites.net/schema",
3+
"docSetProductName": "Azure AI Services",
4+
"rootDirectory": "articles/",
5+
"docLinkSettings": {
6+
"linkFormat": "relative",
7+
"relativeLinkPrefix": "../"
8+
},
9+
"navigationOptions": {
10+
"maximumNumberOfArticles": 5,
11+
"tocParentNode": "Latest documentation updates",
12+
"repoTocFolder": "articles/ai-services",
13+
"indexParentNode": "Latest documentation updates",
14+
"repoIndexFolder": "articles/ai-services"
15+
},
16+
"areas": [
17+
{
18+
"names": [ "ai-services" ],
19+
"heading": "Azure AI Services"
20+
},
21+
{
22+
"names": [ "ai-studio" ],
23+
"heading": "Azure AI Foundry"
24+
},
25+
{
26+
"names": [ "machine-learning" ],
27+
"heading": "Azure Machine Learning"
28+
},
29+
{
30+
"names": [ "search" ],
31+
"heading": "Azure AI Search"
32+
33+
}
34+
]
35+
}
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
---
2+
title: Control model deployment with custom policies
3+
titleSuffix: Azure AI Foundry
4+
description: "Learn how to use custom Azure Policies to control Azure AI services and Azure OpenAI model deployment with Azure AI Foundry."
5+
manager: scottpolly
6+
ms.service: azure-ai-foundry
7+
ms.topic: how-to #Don't change
8+
ms.date: 02/11/2025
9+
author: Blackmist
10+
ms.author: larryfr
11+
reviewer: santiagxf
12+
ms.reviewer: fasantia
13+
14+
---
15+
16+
# Control model deployment with custom policies
17+
18+
When using models from Azure AI Services and Azure OpenAI with [Azure AI Foundry](https://ai.azure.com), you might need to use custom policies to control which [type of deployment](../concepts/deployment-types.md) options are available to users or which specific models users can deploy. This article guides you on how to create policies to control model deployments using Azure Policies.
19+
20+
## Prerequisites
21+
22+
- An Azure subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
23+
- Permissions to create and assign policies. To create and assign policies, you must be an [Owner](/azure/role-based-access-control/built-in-roles#owner) or [Resource Policy Contributor](/azure/role-based-access-control/built-in-roles#resource-policy-contributor) at the Azure subscription or resource group level.
24+
- Familiarity with Azure Policy. To learn more, see [What is Azure Policy?](/azure/governance/policy/overview).
25+
26+
## Create a custom policy
27+
28+
Follow these steps to create and assign an example custom policy to control model deployments:
29+
30+
1. From the [Azure portal](https://portal.azure.com), select **Policy** from the left side of the page. You can also search for **Policy** in the search bar at the top of the page.
31+
32+
2. From the left side of the Azure Policy Dashboard, select **Authoring**, **Definitions**, and then select **+ Policy definition** from the top of the page.
33+
34+
:::image type="content" source="../media/configure-deployment-policies/create-new-policy.png" alt-text="An screenshot showing how to create a new policy definition in Azure Policies." lightbox="../media/configure-deployment-policies/create-new-policy.png":::
35+
36+
3. In the **Policy Definition** form, use the following values:
37+
38+
- **Definition location**: Select the subscription or management group where you want to store the policy definition.
39+
- **Name**: Enter a unique name for the policy definition. For example, `Custom allowed Azure AI services and Azure OpenAI models`.
40+
- **Description**: Enter a description for the policy definition.
41+
- **Category**: You can either create a new category or use an existing one. For example, "AI model governance."
42+
43+
4. On **Policy rule**, enter the policy rule details in JSON format. Select the scenario that applies to your case better:
44+
45+
# [Enforce specific models](#tab/models)
46+
47+
The following policy allows you to control which specific models and versions are available for deployment. You can enforce this policy at different levels depending on your needs.
48+
49+
```json
50+
{
51+
"mode": "All",
52+
"policyRule": {
53+
"if": {
54+
"allOf": [
55+
{
56+
"field": "type",
57+
"equals": "Microsoft.CognitiveServices/accounts/deployments"
58+
},
59+
{
60+
"not": {
61+
"value": "[concat(field('Microsoft.CognitiveServices/accounts/deployments/model.name'), ',', field('Microsoft.CognitiveServices/accounts/deployments/model.version'))]",
62+
"in": "[parameters('allowedModels')]"
63+
}
64+
}
65+
]
66+
},
67+
"then": {
68+
"effect": "deny"
69+
}
70+
},
71+
"parameters": {
72+
"allowedModels": {
73+
"type": "Array",
74+
"metadata": {
75+
"displayName": "Allowed AI models",
76+
"description": "The list of allowed models to be deployed."
77+
}
78+
}
79+
}
80+
}
81+
```
82+
83+
# [Enforce specific deployment types](#tab/deployments)
84+
85+
The following policy allows you to control which types of deployments are allowed in the Azure AI Services or Azure OpenAI Resources. For example, you might want to prevent developers from creating deployments that result in data processed in a different region. Follow these steps to create a policy that denies creating global processing deployment types.
86+
87+
```json
88+
{
89+
"mode": "All",
90+
"policyRule": {
91+
"if": {
92+
"allOf": [
93+
{
94+
"field": "type",
95+
"equals": "Microsoft.CognitiveServices/accounts/deployments"
96+
},
97+
{
98+
"field": "Microsoft.CognitiveServices/accounts/deployments/sku.name",
99+
"equals": "GlobalStandard"
100+
}
101+
]
102+
},
103+
"then": {
104+
"effect": "deny"
105+
}
106+
}
107+
}
108+
```
109+
110+
---
111+
112+
> [!TIP]
113+
> Azure AI services was originally named Azure Cognitive Services. This name is still used internally by Azure, such as this custom policy where you see a value of `Microsoft.CognitiveServices`. Azure OpenAI is part of Azure AI services, so this policy also applies to Azure OpenAI models.
114+
115+
5. Select **Save** to save the policy definition. After saving, you arrive at the policy definition's overview page.
116+
117+
6. From the policy definition's overview page, select **Assign policy** to assign the policy definition.
118+
119+
7. From the **Assign policy** page, use the following values on the **Basics** tab:
120+
121+
- **Scope**: Select the scope where you want to assign the policy. The scope can be a management group, subscription, or resource group.
122+
- **Policy definition**: This field is prepopulated with the title of policy definition you created previously.
123+
- **Assignment name**: Enter a unique name for the assignment.
124+
- **Policy enforcement**: Make sure that the **Policy enforcement** field is set to **Enabled**. If it isn't enabled, the policy isn't enforced.
125+
126+
Select **Next** at the bottom of the page, or the **Parameters** tab at the top of the page.
127+
128+
8. Configure the parameters for the policy (if any):
129+
130+
# [Enforce specific models](#tab/models)
131+
132+
From the **Parameters** tab, set **Allowed AI models** to the list of models that you want to allow. The list should be a comma-separated list of model names and approved versions, surrounded by square brackets. For example, `["gpt-4,0613", "gpt-35-turbo,0613"]`.
133+
134+
> [!TIP]
135+
> You can find the model names and their versions in the [Azure AI Foundry Model Catalog](https://ai.azure.com/explore/models). Select the model to view the details, and then copy the model name and their version in the title.
136+
137+
# [Enforce specific deployment types](#tab/deployments)
138+
139+
This policy doesn't require parameters.
140+
141+
9. Optionally, select the **Non-compliance messages** tab at the top of the page and set a custom message for noncompliance.
142+
143+
10. Select **Review + create** tab and verify that the policy assignment is correct. When ready, select **Create** to assign the policy.
144+
145+
11. Notify your developers that the policy is in place. They receive an error message if they try to deploy a model that isn't in the list of allowed models.
146+
147+
148+
## Verify policy assignment
149+
150+
To verify that the policy is assigned, navigate to **Policy** in the Azure portal, and then select **Assignments** under **Authoring**. You should see the policy listed.
151+
152+
## Monitor compliance
153+
154+
To monitor compliance with the policy, follow these steps:
155+
156+
1. From the [Azure portal](https://portal.azure.com), select **Policy** from the left side of the page. You can also search for **Policy** in the search bar at the top of the page.
157+
158+
1. From the left side of the Azure Policy Dashboard, select **Compliance**. Each policy assignment is listed with the compliance status. To view more details, select the policy assignment. The following example shows the compliance report for a policy that blocks deployments of type *Global standard*.
159+
160+
:::image type="content" source="../media/configure-deployment-policies/policy-compliance.png" alt-text="An screenshot showing an example of a policy compliance report for a policy that blocks Global standard deployment SKUs." lightbox="../media/configure-deployment-policies/policy-compliance.png":::
161+
162+
## Update the policy assignment
163+
164+
To update an existing policy assignment with new models, follow these steps:
165+
166+
1. From the [Azure portal](https://portal.azure.com), select **Policy** from the left side of the page. You can also search for **Policy** in the search bar at the top of the page.
167+
1. From the left side of the Azure Policy Dashboard, select **Assignments** and find the existing policy assignment. Select the ellipsis (...) next to the assignment and select **Edit assignment**.
168+
1. From the **Parameters** tab, update the **Allowed models** parameter with the new models.
169+
1. From the **Review + Save** tab, select **Save** to update the policy assignment.
170+
171+
## Best practices
172+
173+
- **Granular scoping**: Assign policies at the appropriate scope to balance control and flexibility. For example, apply at the subscription level to control all resources in the subscription, or apply at the resource group level to control resources in a specific group.
174+
- **Policy naming**: Use a consistent naming convention for policy assignments to make it easier to identify the purpose of the policy. Include information such as the purpose and scope in the name.
175+
- **Documentation**: Keep records of policy assignments and configurations for auditing purposes. Document any changes made to the policy over time.
176+
- **Regular reviews**: Periodically review policy assignments to ensure they align with your organization's requirements.
177+
- **Testing**: Test policies in a nonproduction environment before applying them to production resources.
178+
- **Communication**: Make sure developers are aware of the policies in place and understand the implications for their work.
179+
180+
## Related content
181+
182+
- [Azure Policy overview](/azure/governance/policy/overview)
183+
- [Deployment types](../concepts/deployment-types.md)
184+

articles/ai-foundry/model-inference/how-to/quickstart-create-resources.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,3 @@ zone_pivot_groups: azure-ai-models-deployment
2626
::: zone pivot="programming-language-bicep"
2727
[!INCLUDE [bicep](../includes/create-resources/bicep.md)]
2828
::: zone-end
29-
30-
## Next steps
31-
32-
* [Develop applications using Azure AI model inference service in Azure AI services](../supported-languages.md)

articles/ai-foundry/model-inference/how-to/use-chat-completions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,6 @@ zone_pivot_groups: azure-ai-inference-samples
4949
## Related content
5050

5151
* [Use embeddings models](use-embeddings.md)
52+
* [Use image embeddings models](use-image-embeddings.md)
53+
* [Use reasoning models](use-chat-reasoning.md)
5254
* [Azure AI Model Inference API](.././reference/reference-model-inference-api.md)

articles/ai-foundry/model-inference/how-to/use-embeddings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ zone_pivot_groups: azure-ai-inference-samples
4848

4949
## Related content
5050

51-
* [Use embeddings models](use-embeddings.md)
51+
* [Use image embeddings models](use-image-embeddings.md)
5252
* [Azure AI Model Inference API](.././reference/reference-model-inference-api.md)

articles/ai-foundry/model-inference/includes/code-create-chat-client-entra.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ client = ChatCompletionsClient(
2626
endpoint="https://<resource>.services.ai.azure.com/models",
2727
credential=DefaultAzureCredential(),
2828
credential_scopes=["https://cognitiveservices.azure.com/.default"],
29-
model="mistral-large-2407",
3029
)
3130
```
3231

@@ -50,7 +49,6 @@ const clientOptions = { credentials: { "https://cognitiveservices.azure.com" } }
5049
const client = new ModelClient(
5150
"https://<resource>.services.ai.azure.com/models",
5251
new DefaultAzureCredential(),
53-
"mistral-large-2407",
5452
clientOptions,
5553
);
5654
```
@@ -80,15 +78,14 @@ using Azure.AI.Inference;
8078
Then, you can use the package to consume the model. The following example shows how to create a client to consume chat completions with Entra ID:
8179

8280
```csharp
83-
var credential = new DefaultAzureCredential();
81+
TokenCredential credential = new DefaultAzureCredential();
8482
AzureAIInferenceClientOptions clientOptions = new AzureAIInferenceClientOptions();
8583
BearerTokenAuthenticationPolicy tokenPolicy = new BearerTokenAuthenticationPolicy(credential, new string[] { "https://cognitiveservices.azure.com/.default" });
8684
clientOptions.AddPolicy(tokenPolicy, HttpPipelinePosition.PerRetry);
8785

8886
ChatCompletionsClient client = new ChatCompletionsClient(
8987
new Uri("https://<resource>.services.ai.azure.com/models"),
9088
credential,
91-
"mistral-large-2407",
9289
clientOptions.
9390
);
9491
```
@@ -117,7 +114,6 @@ TokenCredential defaultCredential = new DefaultAzureCredentialBuilder().build();
117114
ChatCompletionsClient client = new ChatCompletionsClientBuilder()
118115
.credential(defaultCredential)
119116
.endpoint("https://<resource>.services.ai.azure.com/models")
120-
.model("mistral-large-2407")
121117
.buildClient();
122118
```
123119

0 commit comments

Comments
 (0)