Skip to content

[StirrupAgent] Persist GDPVal deliverables per repeat (task_X/repeat_N/) - #1183

Merged
bxyu-nvidia merged 1 commit into
NVIDIA-NeMo:mainfrom
Kh4L:gdpval-per-repeat-deliverables
Apr 30, 2026
Merged

bxyu-nvidia merged 1 commit into
NVIDIA-NeMo:mainfrom
Kh4L:gdpval-per-repeat-deliverables

Conversation

@Kh4L

@Kh4L Kh4L commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@copy-pr-bot

copy-pr-bot Bot commented Apr 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@bxyu-nvidia
bxyu-nvidia merged commit 9bfc772 into NVIDIA-NeMo:main Apr 30, 2026
6 checks passed
agronskiy added a commit that referenced this pull request Apr 30, 2026
PR #1183 introduced ``task_<id>/repeat_<n>/`` persistence but
``_resolve_repeat_dir`` only judged against the lowest-numbered reference
repeat — so for N reference rollouts on disk, N-1 were silently ignored
and the win rate / ELO were anchored to a single reference sample.

Replace ``_resolve_repeat_dir`` with ``_iter_ref_repeat_dirs`` (returns
every ``repeat_*`` dir, falls back to the flat ``task_<id>/`` layout for
back-compat) and run a full ``num_comparison_trials`` judge sweep against
each reference repeat. Sum the raw judge votes into new
``total_wins``/``total_losses``/``total_ties`` fields on the verify
response. ``aggregate_metrics`` prefers those raw counts when present so
the win rate now averages over reference variance; verify responses
without the new fields fall back to the previous one-vote-per-matchup
counting.

Signed-off-by: Alex Gronskiy <[email protected]>
bxyu-nvidia pushed a commit that referenced this pull request Apr 30, 2026
…1198)

## Summary

- Follow-up to #1183. That PR persisted GDPVal deliverables under
`task_<id>/repeat_<n>/` per rollout, but the comparison verifier's
helper `_resolve_repeat_dir` only ever picked the **lowest-numbered**
reference repeat. For N reference rollouts on disk, N-1 were silently
ignored, so the win rate / ELO were anchored to a single reference
sample instead of averaging over reference variance.
- Replace `_resolve_repeat_dir` with `_iter_ref_repeat_dirs`, which
returns **every** `repeat_*` dir (and falls back to the flat
`task_<id>/` layout for back-compat with pre-#1183 reference dirs).
- In `_verify_comparison`, run a full `num_comparison_trials` judge
sweep against each reference repeat for the eval rollout under
verification. Sum raw judge votes into new `total_wins` / `total_losses`
/ `total_ties` fields on `GDPValVerifyResponse`.
- `aggregate_metrics` now prefers those raw counts when present, so the
comparison win rate (and ELO) reflect every (eval_repeat × ref_repeat ×
trial) judge vote rather than treating each verify call as a single
matchup. Verify responses produced before this change (without the new
fields) fall back to the existing one-vote-per-matchup counting.

The per-call cost goes up linearly with the number of reference repeats
on disk — that is the intended tradeoff. `num_comparison_trials` is
unchanged per matchup.

## Test plan

- [x] `pytest resources_servers/gdpval/tests/test_app.py -x` (14 passed)
- [x] `pytest tests/unit_tests/ -x` (206 passed, no regressions)
- [x] `pre-commit run --files resources_servers/gdpval/...`
- New tests cover:
- `_iter_ref_repeat_dirs` returns all sorted repeats / falls back to
flat layout / returns `[]` for missing.
- Multi-ref-repeat path: every `repeat_*` is judged and raw votes are
summed (`total_wins=9` for 3 repeats × 3 wins each).
- Flat-layout back-compat: only one matchup is run when the reference
uses the pre-#1183 layout.
- `aggregate_metrics` sums raw vote counts when verify responses carry
them.

Signed-off-by: Alex Gronskiy <[email protected]>
Kh4L pushed a commit to Kh4L/NemoGym that referenced this pull request Apr 30, 2026
PR NVIDIA-NeMo#1183 introduced ``task_<id>/repeat_<n>/`` persistence but
``_resolve_repeat_dir`` only judged against the lowest-numbered reference
repeat — so for N reference rollouts on disk, N-1 were silently ignored
and the win rate / ELO were anchored to a single reference sample.

Replace ``_resolve_repeat_dir`` with ``_iter_ref_repeat_dirs`` (returns
every ``repeat_*`` dir, falls back to the flat ``task_<id>/`` layout for
back-compat) and run a full ``num_comparison_trials`` judge sweep against
each reference repeat. Sum the raw judge votes into new
``total_wins``/``total_losses``/``total_ties`` fields on the verify
response. ``aggregate_metrics`` prefers those raw counts when present so
the win rate now averages over reference variance; verify responses
without the new fields fall back to the previous one-vote-per-matchup
counting.

Signed-off-by: Alex Gronskiy <[email protected]>
cmunley1 pushed a commit that referenced this pull request May 1, 2026
cmunley1 pushed a commit that referenced this pull request May 1, 2026
…1198)

## Summary

- Follow-up to #1183. That PR persisted GDPVal deliverables under
`task_<id>/repeat_<n>/` per rollout, but the comparison verifier's
helper `_resolve_repeat_dir` only ever picked the **lowest-numbered**
reference repeat. For N reference rollouts on disk, N-1 were silently
ignored, so the win rate / ELO were anchored to a single reference
sample instead of averaging over reference variance.
- Replace `_resolve_repeat_dir` with `_iter_ref_repeat_dirs`, which
returns **every** `repeat_*` dir (and falls back to the flat
`task_<id>/` layout for back-compat with pre-#1183 reference dirs).
- In `_verify_comparison`, run a full `num_comparison_trials` judge
sweep against each reference repeat for the eval rollout under
verification. Sum raw judge votes into new `total_wins` / `total_losses`
/ `total_ties` fields on `GDPValVerifyResponse`.
- `aggregate_metrics` now prefers those raw counts when present, so the
comparison win rate (and ELO) reflect every (eval_repeat × ref_repeat ×
trial) judge vote rather than treating each verify call as a single
matchup. Verify responses produced before this change (without the new
fields) fall back to the existing one-vote-per-matchup counting.

The per-call cost goes up linearly with the number of reference repeats
on disk — that is the intended tradeoff. `num_comparison_trials` is
unchanged per matchup.

## Test plan

- [x] `pytest resources_servers/gdpval/tests/test_app.py -x` (14 passed)
- [x] `pytest tests/unit_tests/ -x` (206 passed, no regressions)
- [x] `pre-commit run --files resources_servers/gdpval/...`
- New tests cover:
- `_iter_ref_repeat_dirs` returns all sorted repeats / falls back to
flat layout / returns `[]` for missing.
- Multi-ref-repeat path: every `repeat_*` is judged and raw votes are
summed (`total_wins=9` for 3 repeats × 3 wins each).
- Flat-layout back-compat: only one matchup is run when the reference
uses the pre-#1183 layout.
- `aggregate_metrics` sums raw vote counts when verify responses carry
them.

Signed-off-by: Alex Gronskiy <[email protected]>
Signed-off-by: cmunley1 <[email protected]>
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