[azure-ai-projects] evals.runs.output_items.list returns fewer items than the run holds right after status is completed

Offen
#49,926 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
azure, python

Rechercherichtung

Start by tracing get_openai_client() and the azure-ai-projects integration for evals.runs.output_items.list, then compare its pagination and response handling with the run's result_counts. The report does not identify whether the delay is in the service or SDK, so first reproduce it by polling until completed and listing immediately and again several seconds later. Done means identifying the cause and ensuring completed runs expose all output items consistently, or documenting the service's expected delay.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

AI Projects Client customer-reported question
  • Package Name: azure-ai-projects (OpenAI-compatible Evals API through get_openai_client())
  • Package Version: 2.9.0 (openai 3.17.0)
  • Operating System: Windows 11 and Ubuntu (GitHub-hosted runner)
  • Python Version: 3.13

Describe the bug
Right after evals.runs.retrieve(...) reports status == "completed", evals.runs.output_items.list(run_id, eval_id=eval_id) can return fewer items than the run holds. Listing the same run again some time later returns every item and result_counts.total equals the number of submitted rows.

Example from one run of 4 rows (custom evaluation, azure_ai_evaluator testing criteria, jsonl file_content data source):

  • First list, immediately after the run became completed: 3 items.
  • Later evals.runs.retrieve(...): status completed, result_counts with total=4, passed=3, failed=1.
  • Later list: 4 items, item ids 0 to 3, all completed.

This happened at least twice in about a dozen runs of the same 4-row evaluation over three days. In both cases the later listing had all the items. Code that reads the listing once silently drops the missing item and compares fewer results than rows.

I don't know whether the lag is in the service or in the SDK pagination, so please route it if this is not the right tracker.

To Reproduce
Steps to reproduce the behavior:

  1. Create an evaluation with openai_client.evals.create(...) using a custom item schema and one or more azure_ai_evaluator testing criteria.
  2. Create a run with 4 rows as a jsonl file_content data source.
  3. Poll evals.runs.retrieve until status is completed, then call evals.runs.output_items.list(run.id, eval_id=evaluation.id) once.
  4. Compare len(items) with the number of rows and with a second listing a few seconds later. It is intermittent.

Expected behavior
Once a run is completed, output_items.list returns all its items, or the run documents that the listing is eventually consistent and how long to wait.

Screenshots
Not applicable.

Additional context

  • Workaround on our side: list again, up to 6 times 5 seconds apart, while a completed run shows fewer items than submitted rows.
  • 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

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Azure/azure-sdk-for-python

Alle Issues in Azure/azure-sdk-for-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.