Skip to content

[GDPVal] Add opt-in persistence of raw judge responses - #1224

Closed
Kh4L wants to merge 9 commits into
NVIDIA-NeMo:mainfrom
Kh4L:gdpval-persist-raw-judge-responses
Closed

Kh4L wants to merge 9 commits into
NVIDIA-NeMo:mainfrom
Kh4L:gdpval-persist-raw-judge-responses

Conversation

@Kh4L

@Kh4L Kh4L commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a config flag persist_raw_judge_responses: bool = False on GDPValResourcesServerConfig. When True, the raw judge completion text from every trial is preserved on verify_response.judge_response:

  • Comparison mode — under judge_response.per_ref_repeat[i].raw_responses: list[str] (one per trial, ordered by trial index; trial i was swapped iff i % 2 != 0).
  • Rubric modes (binary / visual / structured) — under top-level judge_response.raw_responses: list[str].

Off by default. Raw responses are 10–50 KB × num_trials × num_ref_repeats × num_tasks, so always-on would meaningfully bloat rollout JSONLs and W&B uploads. Turn on for debug runs to post-mortem judge verdicts (e.g. understanding why a comparison-mode run lost 87% of pairwise comparisons).

Why

When a comparison-mode or rubric run produces unexpected scores, the only persisted signal today is parsed counts/numbers — the judge's actual rationale, criterion-by-criterion grades, and verdict text are fetched and discarded. With this flag, those raw strings survive into the rollout JSONL so post-mortem analysis is possible without re-running.

Stacking

Builds on PR #1222 ([GDPVal] Add structured rubric scoring mode); the structured-rubric kwarg additions only make sense once that lands. Once #1222 merges, this PR will rebase to a single commit cleanly.

Test plan

  • Unit tests added: test_persist_raw_judge_responses_comparison, test_persist_raw_judge_responses_rubric — verify both modes pass the flag through to the underlying scorers and that returned raw text appears in the response.
  • Smoke run on a small AfterQuery sample with the flag on, inspect resulting JSONL for raw_responses field shape.

Kh4L and others added 8 commits April 29, 2026 18:45
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]>
@copy-pr-bot

copy-pr-bot Bot commented May 4, 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.

@Kh4L
Kh4L force-pushed the gdpval-persist-raw-judge-responses branch from 7c3f5bb to 615dfd0 Compare May 4, 2026 19:28
@Kh4L

Kh4L commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1225 — same change rebased clean off main, drops 8 stale stack commits (down from 826 → 158 lines).

@Kh4L Kh4L closed this May 4, 2026
agronskiy pushed a commit that referenced this pull request May 4, 2026
## Summary

Adds a config flag `persist_raw_judge_responses: bool = False` on
`GDPValResourcesServerConfig`. When True, the raw judge completion text
from every trial is preserved on `verify_response.judge_response`:

- **Comparison mode** — under
`judge_response.per_ref_repeat[i].raw_responses: list[str]` (one per
trial, ordered by trial index; trial `i` was swapped iff `i % 2 != 0`).
- **Rubric modes** (binary / visual / structured) — under top-level
`judge_response.raw_responses: list[str]`.

Off by default. Raw responses are 10–50 KB × `num_trials` ×
`num_ref_repeats` × `num_tasks`, so always-on would meaningfully bloat
rollout JSONLs and W&B uploads. Turn on for debug runs to post-mortem
judge verdicts (e.g. understanding why a comparison-mode run lost 87% of
pairwise comparisons).

## Why

When a comparison-mode or rubric run produces unexpected scores, the
only persisted signal today is parsed counts/numbers — the judge's
actual rationale, criterion-by-criterion grades, and verdict text are
fetched and discarded. With this flag, those raw strings survive into
the rollout JSONL so post-mortem analysis is possible without
re-running.

## Dependency

The structured-rubric scorer modified here is added by #1222. Until
#1222 lands, this PR's diff includes its commit; after #1222 merges, a
rebase against main auto-drops the duplicate (patch-id match).

## Test plan

- [x] Unit tests added: `test_persist_raw_judge_responses_comparison`,
`test_persist_raw_judge_responses_rubric` — verify both modes pass the
flag through to the underlying scorers and that returned raw text
appears in the response.
- [ ] Smoke run on a small AfterQuery sample with the flag on, inspect
resulting JSONL for `raw_responses` field shape (in flight on HSG).

## Replaces #1224

Supersedes draft #1224 which carried 9 commits / 826 lines from a stale
Kh4L:dev stack (5 already-merged-to-main with different SHAs). Closing
that one.

---------

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