Skip to content

feat: add rubric-mean and fixed-baseline scoring to GenRM compare - #4640

Merged
yfw merged 10 commits into
mainfrom
jveronvialar/rlhf-rubric-mean-fixed-baseline-main
Oct 17, 2026
Merged

yfw merged 10 commits into
mainfrom
jveronvialar/rlhf-rubric-mean-fixed-baseline-main

Conversation

@jveronvialard

Copy link
Copy Markdown
Contributor

What does this PR do ?

Adds support for rubric mean and fixed baseline comparison for RLHF. Logs rubric/overall rewards, reasoning and response token counts, reward ties and variance, parse failures, and GenRM token usage.

Issues

N/A

Usage

env:
    nemo_gym:
        genrm_compare_resources_server:
            resources_servers:
                genrm_compare:
                    num_rollouts_per_prompt: 32
                    comparison_mode: fixed_baseline
                    score_source: rubric_mean

Each dataset row must provide the baseline and expected rubric IDs.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

Depends on NVIDIA-NeMo/Gym#4072. Similar to #4346 but targeting main branch.

@jveronvialard
jveronvialard requested a review from yfw October 9, 2026 21:10
@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 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.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 2ad95a9 (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Julien Veron Vialard <[email protected]>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 4d7a8b4 (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Comment thread nemo_rl/environments/nemo_gym.py Resolved
Comment thread nemo_rl/experience/rollouts.py Resolved
Comment thread nemo_rl/experience/rollouts.py Resolved
Comment thread nemo_rl/experience/rollouts.py Resolved
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 856fad1 (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 9f7b86d (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Julien Veron Vialard <[email protected]>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: a2db9ca (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Julien Veron Vialard <[email protected]>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 99ce3c7 (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 9dafc7e (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@yfw yfw added the CI:L1 Run doctests, unit tests, and functional tests label Oct 15, 2026
@yfw

yfw commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

/ok to test 9dafc7e

yfw
yfw previously approved these changes Oct 15, 2026
@yfw
yfw enabled auto-merge (squash) October 15, 2026 17:59
Signed-off-by: Julien Veron Vialard <[email protected]>
yfw
yfw previously approved these changes Oct 15, 2026
@yfw

yfw commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

/ok to test 69127bf

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 69127bf (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@yfw

yfw commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

CI:L1 passed https://github.com/NVIDIA-NeMo/RL/actions/runs/38812811567/job/116877082968?pr=4640, but we could not merge because of a conflict with main. Changing to CI:Lfast to get the PR merged more quickly after resolving conflict

@yfw yfw added CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) and removed CI:L1 Run doctests, unit tests, and functional tests labels Oct 16, 2026
…hf-rubric-mean-fixed-baseline-main

# Conflicts:
#	nemo_rl/experience/rollouts.py
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 76144e2 (PR #4640 from jveronvialar/rlhf-rubric-mean-fixed-baseline-main)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@yfw

yfw commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

/ok to test 76144e2

@yfw
yfw merged commit b43d298 into main Oct 17, 2026
165 of 167 checks passed
@yfw
yfw deleted the jveronvialar/rlhf-rubric-mean-fixed-baseline-main branch October 17, 2026 11:15
alexandery-nvidia added a commit that referenced this pull request Oct 17, 2026
…failures-and-redispatch

main gained #4481, #4771, #4458, #4770, #4640, #4765, #4525 and #4670 since the
previous merge. #4640 (rubric-mean and fixed-baseline GenRM scoring) rewrote the
metric assertions in tests/unit/experience/test_rollouts.py that this branch also
edits for nemo_gym_infra_redispatches: the resolution keeps main's per-key
assertions and adds the redispatch count beside them, and the expected
rollout_metrics dict carries both sides' new keys. test_rollouts.py,
test_rollout_manager.py and test_nemo_gym.py pass locally on the merged tree.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: alexandery <[email protected]>
alexandery-nvidia added a commit that referenced this pull request Oct 17, 2026
…andery/gym-health-check-during-collection

Carries the stack root's merge of main (8338530: #4481, #4771, #4458, #4770,
#4640, #4765, #4525 and #4670) forward so this head stays current with main.
No conflicts; test_rollouts.py, test_rollout_manager.py and test_nemo_gym.py
pass locally on the merged tree.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: alexandery <[email protected]>
alexandery-nvidia added a commit that referenced this pull request Oct 17, 2026
…roups-distinct-first-prompts

main moved 19 commits (c30bbd4..8338530) since the previous merge. #4640
(rubric-mean and fixed-baseline GenRM scoring) rewrote the metric assertions in
tests/unit/experience/test_rollouts.py that this branch extends with the
baseline_groups/* keys: the resolution keeps main's per-key assertions and adds
the three baseline_groups assertions beside them. test_rollouts.py passes
locally on the merged tree.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: alexandery <[email protected]>
alexandery-nvidia added a commit that referenced this pull request Oct 17, 2026
…config-mapping-guard

main moved 19 commits (c30bbd4..8338530) since the previous merge. #4640 added
_count_structured_response_tokens to the import list in
tests/unit/environments/test_nemo_gym.py where this branch imports
_refuse_empty_server_mappings; the resolution keeps both imports.
test_nemo_gym.py passes locally on the merged tree.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: alexandery <[email protected]>
alexandery-nvidia added a commit that referenced this pull request Oct 17, 2026
…xandery/gym-rollout-metrics-hook

Carries the stack's merge of main (8338530: #4481, #4771, #4458, #4770, #4640,
#4765, #4525 and #4670) forward. #4640 (rubric-mean and fixed-baseline GenRM
scoring) reports the shared GenRM fields once per group through
_nemo_gym_group_metrics and skips them in both per-agent loops, which this
branch had replaced with per_agent_result_metrics: the resolution keeps the
helper on both paths and adds the same _SHARED_GENRM_METRICS skip inside it,
so the manager no longer imports the constant. test_rollouts.py,
test_rollout_manager.py and test_nemo_gym.py pass locally on the merged tree.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: alexandery <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants