Azure / Azure/azure-sdk-for-python

Intermittent Connection Error with Evaluation for Custom Evaluators

Aperta
#46,627 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
AI Projects bug customer-reported Evaluation needs-team-attention Service Attention
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
213

Descrizione

- **Package Name**: azure-ai-projects
- **Package Version**: 2.1.0
- **Operating System**: MacOs
- **Python Version**: Python 3.12.13

**Describe the bug**
When running an evaluation via the Azure AI Foundry Evals API with custom (prompty-based) evaluators, individual evaluator executions intermittently fail with FAILED_EXECUTION / "Connection error.". The overall run status still returns completed, but affected items have score: null. The same evaluator succeeds in other runs without any change to the configuration.

**To Reproduce**
Steps to reproduce the behavior:
1. Register a custom prompty-based evaluator via the Azure AI Projects SDK
2. Create an evaluation with that custom evaluator as a testing criterion
3. Create and run an evaluation run against a dataset with multiple items
4. Observe output items — some evaluator results contain "code": "FAILED_EXECUTION", "message": "Connection error." with score: null

**Expected behavior**
Custom evaluators should complete successfully or retry on transient connection failures.

**Screenshots**
Run 1 where all succeeded -- all inputs very similar

Image

result 1:
`
"results": [
{
"type": "azure_ai_evaluator",
"name": "ifd_handoff_completeness",
"metric": "ifd_handoff_completeness",
"score": 5.0,
"label": "pass",
"threshold": 3,
"passed": true
}
],
`
result2:
`
"results": [
{
"type": "azure_ai_evaluator",
"name": "ifd_handoff_completeness",
"metric": "ifd_handoff_completeness",
"score": 5.0,
"label": "pass",
"threshold": 3,
"passed": true
}
],
`

Run 2 only 1 of 2 succeeded, the other with error

Image

results 1:
`
"results": [
{
"type": "azure_ai_evaluator",
"name": "ifd_handoff_completeness",
"metric": "ifd_handoff_completeness",
"score": 4.0,
"label": "pass",
"reason": "The tool call includes case CAS-4941DA05 with mismatch details (Lumity vs Life), user ID, and description/context. However, missing critical items like order number, customer contact details, and explicit urgency prevent a fully handoff-ready payload.",
"threshold": 3.0,
"passed": true
}
],
`
**results 2 - CONNECTION ERRORS**
`
"results": [
{
"type": "azure_ai_evaluator",
"name": "ifd_handoff_accuracy",
"metric": "ifd_handoff_accuracy",
"score": null,
"label": null,
"reason": null,
"threshold": null,
"passed": false
},
{
"type": "azure_ai_evaluator",
"name": "ifd_handoff_completeness",
"metric": "ifd_handoff_completeness",
"score": null,
"label": null,
"reason": null,
"threshold": null,
"passed": false
},
{
"type": "azure_ai_evaluator",
"name": "ifd_handoff_accuracy",
"metric": "result",
"score": null,
"label": null,
"reason": null,
"threshold": null,
"passed": null,
"sample": {
"error": {
"code": "FAILED_EXECUTION",
"message": "Connection error."
}
}
},
{
"type": "azure_ai_evaluator",
"name": "ifd_handoff_completeness",
"metric": "result",
"score": null,
"label": null,
"reason": null,
"threshold": null,
"passed": null,
"sample": {
"error": {
"code": "FAILED_EXECUTION",
"message": "Connection error."
}
}
}
],
`

**Additional context**
Intermittent — identical runs succeed without any changes
Only custom (prompty-based) evaluators are affected; built-in evaluators (e.g. builtin.tool_selection) in the same run are not affected
When a custom evaluator errors, it appears twice in the output item results: once with passed: false, label: "NaN", score: null, and once as a separate ["metric": "result"](vscode-file://vscode-app/Users/honeylane.ante/Desktop/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) entry with the FAILED_EXECUTION error

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il flusso di valutazione descritto nell’issue con un valutatore personalizzato basato su prompty e confronta il suo output con quello del valutatore integrato non interessato. Esamina dove l’SDK invoca i valutatori personalizzati e registra i risultati FAILED_EXECUTION; il lavoro è completato quando gli errori di connessione transitori vengono gestiti come previsto e i risultati del valutatore non vengono duplicati né lasciati con punteggi null.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, python
Ambito
api, testing
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
46/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.