Skip to content

Commit 1d47c03

Browse files
authored
update evaluation sdk tsg to include section for redteam, recent github issues (#40589)
* preliminary redteam tsg * add column mapping bullet to evaluate tsg * add storage permissions warning section
1 parent f32a6c2 commit 1d47c03

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

sdk/evaluation/azure-ai-evaluation/TROUBLESHOOTING.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ This guide walks you through how to investigate failures, common errors in the `
66

77
- [Handle Evaluate API Errors](#handle-evaluate-api-errors)
88
- [Troubleshoot Remote Tracking Issues](#troubleshoot-remote-tracking-issues)
9+
- [Troubleshoot Column Mapping Issues](#troubleshoot-column-mapping-issues)
910
- [Troubleshoot Safety Evaluator Issues](#troubleshoot-safety-evaluator-issues)
11+
- [Troubleshoot Quality Evaluator Issues](#troubleshoot-quality-evaluator-issues)
1012
- [Handle Simulation Errors](#handle-simulation-errors)
1113
- [Adversarial Simulation Supported Regions](#adversarial-simulation-supported-regions)
14+
- [Need to generate simulations for specific harm type](#need-to-generate-simulations-for-specific-harm-type)
15+
- [Simulator is slow](#simulator-is-slow)
16+
- [Handle RedTeam Errors](#handle-redteam-errors)
17+
- [Target resource not found](#target-resource-not-found)
18+
- [Insufficient Storage Permissions](#insufficient-storage-permissions)
1219
- [Logging](#logging)
13-
- [Get additional help](#get-additional-help)
20+
- [Get Additional Help](#get-additional-help)
1421

1522
## Handle Evaluate API Errors
1623

@@ -30,6 +37,10 @@ This guide walks you through how to investigate failures, common errors in the `
3037

3138
- Additionally, if you're using a virtual network or private link, and your evaluation run upload fails because of that, check out this [guide](https://docs.microsoft.com/azure/machine-learning/how-to-enable-studio-virtual-network#access-data-using-the-studio).
3239
40+
### Troubleshoot Column Mapping Issues
41+
42+
- When using `column_mapping` parameter in evaluators, ensure all keys and values are non-empty strings and contain only alphanumeric characters. Empty strings, non-string values, or non-alphanumeric characters can cause serialization errors and issues in downstream applications. Example of valid mapping: `{"query": "${data.query}", "response": "${data.response}"}`.
43+
3344
### Troubleshoot Safety Evaluator Issues
3445
3546
- Risk and safety evaluators depend on the Azure AI Studio safety evaluation backend service. For a list of supported regions, please refer to the documentation [here](https://aka.ms/azureaisafetyeval-regionsupport).
@@ -54,6 +65,30 @@ The Adversarial simulator does not support selecting individual harms, instead w
5465
Identify the type of simulations being run (adversarial or non-adversarial).
5566
Adjust parameters such as `api_call_retry_sleep_sec`, `api_call_delay_sec`, and `concurrent_async_task`. Please note that rate limits to llm calls can be both tokens per minute and requests per minute.
5667
68+
## Handle RedTeam errors
69+
70+
### Target resource not found
71+
When initializing an Azure OpenAI model directly as `target` for a `RedTeam` scan, ensure `azure_endpoint` is specified in the format `https://<hub>.openai.azure.com/openai/deployments/<deployment_name>/chat/completions?api-version=2025-01-01-preview`. If using `AzureOpenAI`, `endpoint` should be specified in the format `https://<hub>.openai.azure.com/`.
72+
73+
### Insufficient Storage Permissions
74+
If you see an error like `WARNING: Failed to log artifacts to MLFlow: (UserError) Failed to upload evaluation run to the cloud due to insufficient permission to access the storage`, you need to ensure that proper permissions are assigned to the storage account linked to your Azure AI Project.
75+
76+
To fix this issue:
77+
1. Open the associated resource group being used in your Azure AI Project in the Azure Portal
78+
2. Look up the storage accounts associated with that resource group
79+
3. Open each storage account and click on "Access control (IAM)" on the left side navigation
80+
4. Add permissions for the desired users with the "Storage Blob Data Contributor" role
81+
82+
If you have Azure CLI, you can use the following command:
83+
84+
```Shell
85+
# <mySubscriptionID>: Subscription ID of the Azure AI Studio hub's linked storage account (available in Azure AI hub resource view in Azure Portal).
86+
# <myResourceGroupName>: Resource group of the Azure AI Studio hub's linked storage account.
87+
# <user-id>: User object ID for role assignment (retrieve with "az ad user show" command).
88+
89+
az role assignment create --role "Storage Blob Data Contributor" --scope /subscriptions/<mySubscriptionID>/resourceGroups/<myResourceGroupName> --assignee-principal-type User --assignee-object-id "<user-id>"
90+
```
91+
5792
## Logging
5893
5994
You can set logging level via environment variable `PF_LOGGING_LEVEL`, valid values includes `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`, default to `INFO`.

0 commit comments

Comments
 (0)