Repository navigation
Conversation
Signed-off-by: Serge Panev <[email protected]>
This was referenced 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]>
Contributor
Author
|
The changes were merged in #1225 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in
structuredrubric scoring backend on the GDPVal resources server, alongside the existingbinary(default) backend.score_with_rubric_structuredalready lived inscoring.pybut wasn't reachable from a config; this PR wires the dispatch.Why
The current
binaryrubric path has two failure modes on rubrics with many criteria and per-criterion point weights:rubric_json[i].score/rubric_json[i].weight). The binary judge emitsscore: 0|1per criterion and averages, treating+5and+1criteria the same.rationalestrings push the judge response pastmax_tokens, producing partial JSON and the regex-fallback partial-score path. Observed up to 25%invalid_judge_responserate on heavy rubrics.The structured path replaces the JSON-with-rationale output with a tagged
CRITERION_NUMBER[N]: GRADE[X] out of MAX_POSSIBLE_POINTS[Y]format andFINAL_SCORE[…] / MAX_POSSIBLE_SCORE[…]at the end. Reward =FINAL_SCORE / MAX_POSSIBLE_SCORE, multi-trial averaged.On a 10-task pipecleaning run on a heavy-rubric dataset:
Reward distribution went from clustered around 0.6 (regex fallback noise) to a clean 0.47–1.00 spread, with the harder tasks correctly scoring lower.
What changed
GDPValResourcesServerConfig: newrubric_scoring_mode: Literal[\"binary\", \"structured\"] = \"binary\"(default keeps existing behavior).rubric_structured_num_trials(default 2) andrubric_structured_formatting_retries(default 3) tune the structured path.GDPValResourcesServer._verify_rubric: dispatches toscore_with_rubric_structuredwhenrubric_scoring_mode == \"structured\". Existingscore_with_rubric/score_with_rubric_visualpaths are unchanged for the defaultbinarymode.score_with_rubric_structured:max_possiblenow reads eitherscoreorweightper criterion (different upstream rubric formats use different field names), so multiple sources can mix in the same training run without per-source pre-processing.Compatibility
rubric_scoring_modedefaults tobinary. Existing benchmark configs (benchmarks/gdpval/config.yaml, etc.) get exactly the same behavior they have today — no opt-out needed.MAX_POSSIBLE_POINTS=1per criterion, so reward is equivalent to binary in that case.Test plan