Skip to content

Add a replay provider that rescores saved generations - #536

Merged
abhishekraok merged 10 commits into
mainfrom
abhishekr/replay-predictions
Nov 12, 2026
Merged

abhishekraok merged 10 commits into
mainfrom
abhishekr/replay-predictions

Conversation

@abhishekraok

@abhishekraok abhishekraok commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Written by Claude Code session 28dc7c78 (https://claude.ai/code/session_01Amsg4C36artRnazx27HKRY); updated by Claude Code session 27c852a2-737f-40d7-a147-784d52aa3a9b

Closes #457.

Adds a replay provider: rescores a saved run's generations with no model or GPU. It covers the last open item of lcb-stalled-execution (#457) (suggested fix 3) and the replay-provider form asked for in add-offline-score (#315).

uv run olmo-eval run -m <original model> -t <original task + overrides> \
    -H default -o provider.kind=replay -o provider.predictions=<predictions file or results dir> \
    -O <new output dir>
  • Each predictions file is read with the requests file the runner wrote beside it. A request is answered with the saved generation whose prompt (context plus system_prompt) is identical. A request does not say which instance it is and the runner shuffles requests, so a prompt saved for several instances replays only when every save serves the same generation; otherwise its requests fail.
  • It serves the raw generation (original_text when reasoning was stripped), so the task strips and extracts the answer again. finish_reason, the token counts, the raw Harmony decode, its parser error and the context-cut marker carry over.
  • If no saved prompt matches, or the sample count differs from num_samples, the request is marked as a generation error. A replay against the wrong run or the wrong task options then fails through the failure budget instead of scoring 0.
  • A directory holding several models' predictions is rejected, so one model's generations can't stand in for another's. So is a prompt saved by two predictions files (two configurations of one task); pass the file instead.
  • Loglikelihood (BPB) saves are skipped: their saved text is the scored continuation, not a generation.
  • Scope: text generations only. Image and tool requests fail as generation errors, because the saved files keep neither image identities nor native tool calls. It does not replay logprob tasks, multi-turn rollouts, or oe-eval prediction files (the cross-harness mode in add-offline-score (Add offline score-only / replay path: rescore a predictions JSONL without a model #315)).

Checks

  • Unit tests in tests/providers/test_replay_provider.py.
  • Codex review (gpt-6.1-sol): 3 P2 findings, all fixed in the second commit: mixed-model directories, image requests matched on text alone, and tool calls dropped. The Codex bot's later finding (prompts shared across task configurations) is fixed in fbdb92f. Later bot and local Codex findings, all fixed: Harmony decode, parser error and context-cut marker kept (80fe401); an empty original generation stays empty (cb6a920); requests keyed by the context their type saves (b8427d5); repeated prompts no longer served in arrival order (ac7f47a); loglikelihood saves skipped and repeats compared on what replay serves (1ca6ded). A local Codex review of 1ca6ded found nothing.
  • End to end on the Mac: I ran gsm8k with limit 4 on mock, rewrote 2 of the 4 saved answers to the gold answers, and replayed them. The replay scored 0.5, both with -m mock and with -m allenai/OLMo-2-1124-7B (no model load). A chat task, ifeval, also replays. Replaying limit 8 against 4 saved answers fails with FailureBudgetExceeded: 4 of 8 instances get "replay: no saved generation matches this prompt".
  • ruff, ty and the unit suite pass, apart from 4 tests/scripts/test_check_file_sizes.py tests. Those 4 fail the same way on clean main in this checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Amsg4C36artRnazx27HKRY

abhishekraok and others added 2 commits November 3, 2026 10:22
provider.kind=replay with provider.predictions=<file or results dir> answers
each request with the generation an earlier run saved for the same prompt,
matched through the requests file saved beside each predictions file. Unmatched
prompts and sample-count mismatches fail as generation errors, so the failure
budget catches a replay against the wrong run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Amsg4C36artRnazx27HKRY
Fail image and tool requests, which the saved files cannot pair with the
right image or native tool calls, and reject directories that mix models.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Amsg4C36artRnazx27HKRY
@abhishekraok
abhishekraok requested a review from a team as a code owner November 3, 2026 18:24
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T20:00:51.346670Z e2d800f New commits
ℹ️ 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: 919f967ed3

ℹ️ 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".

Two configurations of a task can save the same prompt with different
sample counts; serving them from one queue could fail every request or
hand one configuration's generations to the other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Amsg4C36artRnazx27HKRY

@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: f9f3f751d4

ℹ️ 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".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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: 80fe4018d7

ℹ️ 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".

…text

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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: cb6a9202eb

ℹ️ 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".

abhishekraok and others added 4 commits November 12, 2026 11:31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rations

A request does not say which instance it is and the runner shuffles requests, so
serving repeated prompts in arrival order could swap instances' generations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@abhishekraok
abhishekraok added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 192d267 Nov 12, 2026
8 checks passed
@abhishekraok
abhishekraok deleted the abhishekr/replay-predictions branch November 12, 2026 20:40
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.

LiveCodeBench: a stalled execution quarantines every podman sandbox and later samples are silently scored 0

2 participants