Skip to content

fix(litmus-bench): give prepared rows a stable task_id - #6650

Merged
iguehring-nvidia merged 1 commit into
mainfrom
iguehring/litmus-task-id
Nov 23, 2026
Merged

iguehring-nvidia merged 1 commit into
mainfrom
iguehring/litmus-task-id

Conversation

@iguehring-nvidia

Copy link
Copy Markdown
Contributor

What does this PR do?

Gives every prepared Litmus-Bench row a stable task_id: the row's metadata.uuid from the published release (unique for all 2056 rows; prepare.py already refuses duplicates).

Until now the rows carried no id, so Gym could not plan the benchmark (ConfigError: Benchmark 'litmus-bench': 2056 of 2056 tasks have no task id) and its tasks could not be selected by id. The uuid belongs to the dataset, so a task keeps its id if rows are reordered. Same approach as #4610 for IFEval.

The litmus_agent task-data schema gains the optional task_id field. The prepared-data provenance fingerprint now includes the id rule, so a cached prepared file without task_id is prepared again instead of being reused.

Validation

  • New test tests/unit_tests/benchmarks/test_litmus_bench_prepare.py: prepared rows carry the source uuid as task_id. It fails without the prepare.py change (KeyError: 'task_id').
  • The two existing exact-row comparisons in benchmarks/litmus-bench/tests/test_prepare.py now expect the added field; that file passes (38 tests with the new one).
  • pre-commit run on the changed files: pass.
  • Real plan with the change, without any Hugging Face token: plan_benchmark("litmus-bench") downloads and prepares the release and returns 2056 tasks, where it was refused before. Selecting one uuid returns exactly that task.

Rollouts

N/A: only the prepared rows gain a field; prompts, verifier inputs and grading are unchanged.

Compatibility and benchmark impact

None for scores. Prepared files gain a task_id field; the next gym eval prepare --benchmark litmus-bench regenerates stale cached files.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally.
  • Documentation added or updated, or N/A with justification. N/A: no documented behaviour changes.
  • Pre-commit checks pass locally. Ran on the changed files.
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off (git commit -s).

🤖 Generated with Claude Code

Gym plans and selects tasks by `task_id`, `problem_id` or `instance_id`.
Litmus-Bench rows carried none, so `gym eval plan --benchmark litmus-bench`
refused all 2056 rows and its tasks could not be selected by id.

Each prepared row now carries `task_id`, the row's `metadata.uuid`, which
the release already guarantees unique and which does not change if rows are
reordered. The litmus_agent task-data schema gains the optional field, and
the provenance fingerprint covers the id rule so a cached file without it
is prepared again. Same approach as #4610 for IFEval.

Signed-off-by: Ingo Guehring <[email protected]>
@iguehring-nvidia
iguehring-nvidia requested review from a team as code owners November 23, 2026 16:20
@iguehring-nvidia iguehring-nvidia self-assigned this Nov 23, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 23, 2026 16:21
@svcnvidia-nemo-ci svcnvidia-nemo-ci added risk:mid Autobot PR risk: mid bug Something isn't working area:data Datasets, preparation, task formats, and materialization needs-review PR is ready for code review and waiting on a reviewer labels Nov 23, 2026

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SHIP

LGTM — no concerns found. I reviewed all four PR files and traced preparation, cache invalidation, planning, task selection and verifier passthrough. The two additional base-to-head test differences are upstream drift, not edits introduced by this PR.

CI on b80e5d5 passed Lint check, Unit tests / Test, Unit tests / Combined core coverage and Unit tests / Server suite. Changed server tests and Session routing end-to-end were skipped, not passed.

I ran prepare_cache_probe.py, planner_probe.py and schema/request-class probes in 766267172432.dkr.ecr.us-east-2.amazonaws.com/ghcr/astral-sh/uv:python3.12-trixie-slim. Using five committed example rows, they confirmed that old caches are rejected for the combined benchmark and every subset, preparation adds only task_id, IDs survive reordering, and UUID selection preserves repeats. The isolated planner rejected the base rows and accepted the new rows. UUID-bearing and absent-ID inputs remained compatible.

These probes used local inputs and isolated imports; I did not download the full published release or run a model rollout.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@iguehring-nvidia
iguehring-nvidia added this pull request to the merge queue Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/45246707809

Merged via the queue into main with commit e8e0b47 Nov 23, 2026
74 checks passed
@iguehring-nvidia
iguehring-nvidia deleted the iguehring/litmus-task-id branch November 23, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:data Datasets, preparation, task formats, and materialization bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer risk:mid Autobot PR risk: mid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants