[azure-ai-projects] evaluators.create_version for a code evaluator needs the Evaluations=V1Preview header and allow_preview=True does not add it
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 57/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- azure, python
- Bereich
- backend-api-design
Rechercherichtung
Start by tracing how client.evaluators.create_version is generated and how preview feature headers are added through azure/ai/projects/models/_patch.py and the beta sub-client proxy. Compare the top-level call with client.beta.evaluators and check the allow_preview documentation. Reproduce with a code evaluator and confirm the expected header behavior; the issue also accepts documenting the requirement.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
- Package Name: azure-ai-projects
- Package Version: 2.9.0
- Operating System: Windows 11 and Ubuntu (GitHub-hosted runner), same behavior in both
- Python Version: 3.13
Describe the bug
Creating an evaluator version whose definition type is code with client.evaluators.create_version(...) fails with:
azure.core.exceptions.HttpResponseError: (UserError) This operation requires the following opt-in preview feature(s): Evaluations=V1Preview. Include the 'Foundry-Features: Evaluations=V1Preview' header in your request.
AIProjectClient(..., allow_preview=True) does not change the result. In the installed package, the Foundry-Features value for evaluators is registered in _BETA_OPERATION_FEATURE_HEADERS["evaluators"] (azure/ai/projects/models/_patch.py) and is injected only through the client.beta sub-client proxy. In 2.9.0 client.beta.evaluators has no create_version, and the top-level client.evaluators.create_version does not add the header, with or without allow_preview=True. So no SDK-native path sends the opt-in header for this call.
Creating an evaluator version with a rubric definition through the same client.evaluators.create_version call succeeded without the header in the same project, so the requirement seems to apply to the code definition type.
Passing the header explicitly works:
client.evaluators.create_version(
name=name,
evaluator_version=version,
headers={"Foundry-Features": "Evaluations=V1Preview"},
)
To Reproduce
Steps to reproduce the behavior:
- Create
AIProjectClient(endpoint=..., credential=..., allow_preview=True). - Call
client.evaluators.create_version(name="my-code-evaluator", evaluator_version={...})withcategories=[EvaluatorCategory.QUALITY], adisplay_name, adescriptionand adefinitionoftype=EvaluatorDefinitionType.CODEwithcode_text(a short function that turns one input column into a score),init_parameters,metricsanddata_schema. - The call raises the
HttpResponseErrorabove. - Repeat with
headers={"Foundry-Features": "Evaluations=V1Preview"}: the evaluator is created.
Expected behavior
One of these: allow_preview=True adds the Foundry-Features: Evaluations=V1Preview header to client.evaluators.create_version for definition types that need it, the method adds it by itself like the beta sub-client methods do, or the docstring of create_version and allow_preview states the requirement. The allow_preview docstring currently lists only workflow agents and human evaluation rule actions.
Screenshots
Not applicable.
Additional context
- This regressed for us when moving to 2.9.0 from 2.7.0, where the same call went through
client.beta.evaluators.create_version; the same code evaluator was created successfully before the move. - I can provide more information if needed.
- Vorherrschende Sprache
- Python
- Sterne
- 5.6k
- Forks
- 3.4k
- Ø Merge
- 1 T. 22 Std.
- Gemergte PRs (30 T.)
- 189
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Azure/azure-sdk-for-python
-
needs-triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
Azure/azure-sdk-for-python#50155 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Teams Chatbot]: next-mypy install 404s should point to CFS auth or --pypi workaroundEvtl. vergeben @jianingwang123 hat das vor 17 Tagen übernommen. Offenneeds-triage
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Azure/azure-sdk-for-python#49886 · 1 Kommentar · 2 Reaktionen · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
[AI Projects] AIProjectInstrumentor: non-streamed responses.create raises AttributeError ('NonRecordingSpan' object has no attribute 'attributes') when the span is not sampledEvtl. vergeben @14H034160212 hat das vor 19 Tagen übernommen. OffenAI Projects Client customer-reported question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Azure/azure-sdk-for-python#49854 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
azure-eventhub migration guide: legacy checkpoint sample writes "None" metadata for partitions that were never checkpointedEvtl. vergeben @hidingmyname hat das vor 27 Tagen übernommen. OffenClient customer-reported Event Hubs needs-team-attention question Service Attention
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Azure/azure-sdk-for-python#49723 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Scheduled test pipelines fail at the Analyze_Test stage due to date formattingEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. OffenEngSys
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Azure/azure-sdk-for-python#49614 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Azure/azure-sdk-for-python
Ähnliche Issues
-
🧫10장-투향
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
hyunjimoon/golden-cage-book#188 ·
-
agent/scanner bug stage/010-actionable
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
torch-spyre/spyre-inference#1812 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bug: fenced drafts inside <think> tags break parsing or are returned instead of the answerEvtl. vergeben @aad1tyaaaaa hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
google/langextract#639 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[oblt-aw][autodoc] Update autodoc routing docs for relative in-repo lock usesEvtl. vergeben @github-actions hat das heute übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 87/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag