Skip to content

fix: drain full trajectory batches after completion bursts - #1124

Open
original4422 wants to merge 2 commits into
OpenPipe:mainfrom
original4422:fix/trajectory-batch-completion-bursts
Open

original4422 wants to merge 2 commits into
OpenPipe:mainfrom
original4422:fix/trajectory-batch-completion-bursts

Conversation

@original4422

@original4422 original4422 commented Oct 14, 2026 •

Copy link
Copy Markdown

Summary

Keep completion bursts bounded while preserving rollout scheduling and failure checks between yielded batches.

refill rollout slots
check completed tasks (zero timeout when a full batch is buffered)
yield one full batch, then repeat
yield the final partial batch

Public signatures, skip behavior and exception handling are unchanged. Developed with AI assistance.

Evidence

  • Before: eight immediately completed groups with batch_size=2 yielded [2, 6]; seven yielded [2, 5] and twelve [2, 2, 8]. Five burst regressions failed on main.
    After: batches stay bounded; all 12 public-API regressions and 3 existing localhost trajectory tests passed on macOS/Python 3.12. Event barriers also verify that completed pending failures propagate before another buffered batch and that new rollouts start before the backlog is drained.
  • Complete uv run prek run --all-files passed with ty explicitly targeting Linux, matching the quality CI container, via an external config preserving all other repository settings. Default macOS ty has four pre-existing Linux-only attribute errors; ruff/format/lock passed. No hooks skipped. This does not claim Linux runtime, the full manual unit suite or GPU/backend validation.
  • The separate exception-budget reset behavior addressed by Keep max_batch_exceptions for every batch in trajectory_group_batches #969 is unchanged.

Merge Danger

Door: two-way

Blast Radius: batching

Consumers receive bounded batches while rollout generation can overlap their processing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-10-14T06:54:02.298349Z a5fd7e2 PR opened
ℹ️ About Codex in GitHub

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

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5fd7e2524

ℹ️ About Codex in GitHub

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

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/art/batches.py Outdated
Comment thread src/art/batches.py Outdated
@original4422

Copy link
Copy Markdown
Author

Hi @bradhilton, could you review this batching fix when you have time? The two automated timing concerns are addressed; the PR description includes the regression results and local validation limitations. Thanks!

This branch has not been deployed

No deployments
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.

1 participant