Skip to content

fix(eval): await asynchronous data sources - #1076

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
braintrustdata:mainfrom
feiiiiii5:codex/await-eval-data
Nov 6, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 1 commit into
braintrustdata:mainfrom
feiiiiii5:codex/await-eval-data

Conversation

@feiiiiii5

Copy link
Copy Markdown
Contributor

EvalData accepts awaitable iterators and async data factories, but both Eval and EvalAsync currently pass the resulting coroutine into a synchronous for loop. Evaluation fails with TypeError: 'coroutine' object is not iterable before processing a sample.

Await the data after resolving its factory and before adapting the iterator. This matches the existing workflow_eval.py handling and preserves synchronous iterators and async generators.

Validation on Python 3.13.18 with locked dependencies:

  • The new public-API regression has 4 failures and 4 passing synchronous controls on base e26deb0; all 8 cases pass with the fix.
  • pytest src/braintrust/test_framework.py src/braintrust/test_framework2.py --vcr-record=none -q: 180 passed, 5 skipped.
  • Ruff 0.15.21 lint and format checks pass for both changed files.
  • Full pre-commit run --all-files passes (pre-commit 4.6.2, including Ruff and Codespell).
  • Targeted Pylint (--errors-only) passes for both changed files.
  • Full nox -R -s test_core -- --vcr-record=none -q: 1,127 passed, 114 skipped, 12 xfailed, 23 subtests passed. Git signing was disabled only in this test process for deterministic generated Git fixtures.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T14:42:54.539565Z bb9ea98 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 795f33b into braintrustdata:main Nov 6, 2026
98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants