Repository navigation
feat(genrm_compare): adaptive length penalties - #6337
Conversation
Signed-off-by: Julien Veron Vialard <[email protected]>
…vialard/genrm-adaptive-length-penalty
|
/ok to test 8b72714 |
yfw
left a comment
There was a problem hiding this comment.
SHIP WITH CARE. No bug blocks this PR. The PR body does not show a smoke rollout with a real judge model yet, and that needs a decision before merge.
The README now documents the coefficient rules and the media behavior, and only user turns send media to the judge. With the new fields unset, judge requests and prompt digests for text-only rows do not change. All 391 genrm_compare tests pass at this head, and CI is green.
Please add a short smoke rollout with a real judge model to the Rollouts section, as AGENTS.md asks for behavior-changing environment work. The section lists only mocked-judge tests now. One image group with a vision judge and one text group with coefficient overrides are enough.
Generated by Claude Code
Co-authored-by: Yi-Fu Wu <[email protected]> Signed-off-by: Julien Veron Vialard <[email protected]>
Co-authored-by: Yi-Fu Wu <[email protected]> Signed-off-by: Julien Veron Vialard <[email protected]>
Co-authored-by: Yi-Fu Wu <[email protected]> Signed-off-by: Julien Veron Vialard <[email protected]>
…vialard/genrm-adaptive-length-penalty
…/github.com/NVIDIA-NeMo/Gym into jveronvialard/genrm-adaptive-length-penalty
|
/ok to test 00eaac9 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/44632652990 |
…ed-comparisons Brings in #3625 (response compaction and retention) and #6337 (per-request length coefficients). Four conflict blocks in genrm_compare/app.py, each resolved by keeping both sides: - typing imports: the union of both lists. - verify: main's digest-scheme check runs first, then this branch's rule that a member masked alone gets its recorded failure even for a regenerated answer. - verify: a completed cohort still answers through _completed_member_response, so a member masked alone gets its judge failure. - _finished_member_state: the member's own digest scheme from main, next to the member's own failure report from this branch. Two more changes keep the merged code working: - _aggregate_results takes main's length_coefficients keyword and passes it to _score_results, so the per-request coefficients apply over the scored members. Without it, every /verify group failed with a TypeError. - main's saved-coefficient check reads cohort.results with .get: a member masked alone has no saved result, so it has no recorded coefficients. Without it, a replay of a masked member raised KeyError. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Yi-Fu Wu <[email protected]>
What does this PR do?
Add optional
group_answer_length_penalty_coeffandgroup_reasoning_length_penalty_coeffto/verifyso they can be set per rollout group.Also preserve user images in judge requests and add
default_rubric_idsso/verifyand/comparecan use the judge's baked-in rubric whenuse_principleis false.Validation
12 focused tests passed.
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest \ -p no:cacheprovider -p pytest_asyncio.plugin -q \ resources_servers/genrm_compare/tests/test_app.py \ resources_servers/genrm_compare/tests/test_checkpoint.py \ -k 'coefficients or coefficient_echo or image_in_conversation_order or media_message or selected_rubric or singleton'Rollouts
Ran two
/verifygroups with fixed candidate answers and a live judge. All four calls returned HTTP 200 with zero judge parse failures.0.12and0.09. The short response received a+0.105length adjustment and the long response received-0.105.Compatibility and benchmark impact
Existing callers can omit the new parameters. Overrides require at least two generated responses per group. Passing user images to the judge may change multimodal scores.
Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).