Skip to content

[GDPVal] Align rubric judge max_tokens default with comparison mode - #1215

Closed
Kh4L wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
Kh4L:gdpval-rubric-default-max-tokens
Closed

Kh4L wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
Kh4L:gdpval-rubric-default-max-tokens

Conversation

@Kh4L

@Kh4L Kh4L commented May 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Two related fixes to make rubric and comparison judging share one consistent override mechanism + sane defaults.

1. Bump rubric default max_tokens 8192 → 65535

Mode File Old default New default
Rubric (text) resources_servers/gdpval/scoring.py::score_with_rubric 8192 65535
Rubric (visual / multimodal) resources_servers/gdpval/scoring.py::score_with_rubric_visual 8192 65535
Comparison (pairwise) resources_servers/gdpval/comparison.py::send_judge_request 65535 unchanged

8192 was a footgun for multi-criterion rubric tasks: the judge has to emit one score + rationale per criterion as JSON, which routinely truncated and forced the regex-fallback path. Historically that surfaced as ~50% invalid_judge_response on the 220-task GDPVal validation and ~44% on 140-task Mercor pre-override; bumping the cap drops it to <1%.

2. Plumb judge_responses_create_params_overrides through comparison mode

Rubric mode already merges create_overrides over the request kwargs in scoring.py. Comparison mode read the same config dict but only consumed model and api_key — every other override (max_tokens, temperature, top_p, …) was silently dropped on the way to send_judge_request.

This PR threads create_overrides through run_trials → send_judge_request and switches app.py::_verify_comparison to pop model/api_key (mirroring rubric) so the rest of the dict reaches the judge call.

After this, judge_responses_create_params_overrides.max_tokens=N (and any other create kwarg) applies symmetrically in both modes.

Compatibility

  • create_overrides is added with default=None on both run_trials and send_judge_request; existing callers that pass only the positional args continue to work.
  • The override merge is dict.update (overrides win) — same pattern as rubric — so any caller already passing judge_responses_create_params_overrides.max_tokens continues to win over the new default.

Test plan

  • Existing tests in resources_servers/gdpval/tests/test_app.py pass an explicit max_tokens=16384 and assert it lands in create_overrides; that contract is unchanged.
  • CI green.

Signed-off-by: Serge Panev <spanev@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented May 1, 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 closed this May 5, 2026
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.

1 participant