Skip to content

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

Merged
agronskiy merged 3 commits into
mainfrom
spanev-gdpval-persist-raw-judge-responses
May 4, 2026
Merged

agronskiy merged 3 commits into
mainfrom
spanev-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.

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

  • 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.

@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 marked this pull request as ready for review May 4, 2026 20:54
@agronskiy
agronskiy force-pushed the spanev-gdpval-persist-raw-judge-responses branch from 07a42ae to dcfa377 Compare May 4, 2026 21:29
Kh4L added 3 commits May 4, 2026 23:32
Signed-off-by: Serge Panev <spanev@nvidia.com>
Signed-off-by: Alex Gronskiy <agronskiy@nvidia.com>
Signed-off-by: Alex Gronskiy <agronskiy@nvidia.com>
Signed-off-by: Alex Gronskiy <agronskiy@nvidia.com>
@agronskiy
agronskiy force-pushed the spanev-gdpval-persist-raw-judge-responses branch from dcfa377 to 3ecf805 Compare May 4, 2026 21:32
@agronskiy
agronskiy enabled auto-merge (squash) May 4, 2026 21:32
@agronskiy
agronskiy merged commit 98e4df4 into main May 4, 2026
6 checks passed
@agronskiy
agronskiy deleted the spanev-gdpval-persist-raw-judge-responses branch May 4, 2026 21:33
marta-sd added a commit that referenced this pull request Jul 10, 2026
…1234)

## Summary

Two related changes to harmonize judge-side knobs between rubric and
comparison modes:

1. **Rubric default max_tokens 8192 β†’ 65535**
(`scoring.py:score_with_rubric`, `score_with_rubric_visual`). Matches
the default already in place for comparison mode
(`comparison.send_judge_request`) and structured rubric
(`score_with_rubric_structured`). Prevents `finish_reason: length`
truncations on rubrics with many criteria when callers don't override.

2. **`create_overrides` plumbing for comparison-mode judge calls** β€”
adds the same override mechanism to `comparison.send_judge_request` and
threads it through `run_trials` and `_verify_comparison`. Mirrors the
rubric path where `judge_responses_create_params_overrides` already gets
merged into `chat.completions.create`. Also switches
`_verify_comparison` from `overrides.get` β†’ `overrides.pop` so
`model`/`api_key` are consumed and the rest pass through (same pattern
`_verify_rubric` uses post #1225).

After this lands, callers can override max_tokens / temperature / top_p
/ etc. for the comparison-mode judge from Hydra config exactly the same
way they already can for rubric mode.

## Replaces #1215

Supersedes #1215 (same change, rebased onto current main). The original
branch was DIRTY against main due to overlap with #1225 (raw_responses
kwarg on `run_trials`), #1228 (preconvert + `clean_up_list`), and #1229
(`JUDGE_REQUEST_TIMEOUT_SECONDS`). All three are kept; this PR adds
`create_overrides` alongside.

## Test plan

- [x] Existing
`test_app.py::test_verify_rubric_passes_create_overrides_through`
continues to verify the rubric path.
- [ ] Ad-hoc smoke: run a 5-task comparison-mode rollout with
`++gdpval_judge_model.responses_api_models.openai_model.max_tokens=8192`
to verify the override actually reaches the comparison judge call.

Signed-off-by: Serge Panev <spanev@nvidia.com>
Co-authored-by: Marta Stepniewska-Dziubinska <marta-sd@users.noreply.github.com>
OlegSudakov pushed a commit to OlegSudakov/Gym that referenced this pull request Jul 15, 2026
…VIDIA-NeMo#1234)

## Summary

Two related changes to harmonize judge-side knobs between rubric and
comparison modes:

1. **Rubric default max_tokens 8192 β†’ 65535**
(`scoring.py:score_with_rubric`, `score_with_rubric_visual`). Matches
the default already in place for comparison mode
(`comparison.send_judge_request`) and structured rubric
(`score_with_rubric_structured`). Prevents `finish_reason: length`
truncations on rubrics with many criteria when callers don't override.

2. **`create_overrides` plumbing for comparison-mode judge calls** β€”
adds the same override mechanism to `comparison.send_judge_request` and
threads it through `run_trials` and `_verify_comparison`. Mirrors the
rubric path where `judge_responses_create_params_overrides` already gets
merged into `chat.completions.create`. Also switches
`_verify_comparison` from `overrides.get` β†’ `overrides.pop` so
`model`/`api_key` are consumed and the rest pass through (same pattern
`_verify_rubric` uses post NVIDIA-NeMo#1225).

After this lands, callers can override max_tokens / temperature / top_p
/ etc. for the comparison-mode judge from Hydra config exactly the same
way they already can for rubric mode.

## Replaces NVIDIA-NeMo#1215

Supersedes NVIDIA-NeMo#1215 (same change, rebased onto current main). The original
branch was DIRTY against main due to overlap with NVIDIA-NeMo#1225 (raw_responses
kwarg on `run_trials`), NVIDIA-NeMo#1228 (preconvert + `clean_up_list`), and NVIDIA-NeMo#1229
(`JUDGE_REQUEST_TIMEOUT_SECONDS`). All three are kept; this PR adds
`create_overrides` alongside.

## Test plan

- [x] Existing
`test_app.py::test_verify_rubric_passes_create_overrides_through`
continues to verify the rubric path.
- [ ] Ad-hoc smoke: run a 5-task comparison-mode rollout with
`++gdpval_judge_model.responses_api_models.openai_model.max_tokens=8192`
to verify the override actually reaches the comparison judge call.

Signed-off-by: Serge Panev <spanev@nvidia.com>
Co-authored-by: Marta Stepniewska-Dziubinska <marta-sd@users.noreply.github.com>
Signed-off-by: Oleg Sudakov <oleg.sudakov@outlook.com>
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