Skip to content

Mpatelka/gym compare v0 - #2635

Merged
mpatel31415 merged 2 commits into
mainfrom
mpatelka/gym-compare-v0
Aug 31, 2026
Merged

mpatel31415 merged 2 commits into
mainfrom
mpatelka/gym-compare-v0

Conversation

@mpatel31415

@mpatel31415 mpatel31415 commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds gym compare, a new CLI command that diffs a baseline eval run against a candidate run and writes a report.
Related epic: #1493 and issue addressed by this PR: #2531

Note

This to be fully completed needs statistical testing and rollout quality, this PR add a skeleton of the report and machine readible output file, report deltas and ci.

Later output of statistical tests and  rollout quality work can be just plugged in follow-up steps.

Output report example

compare_report.md

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format/copyright pass).
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

@copy-pr-bot

copy-pr-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions

github-actions Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🌿 Preview your docs: https://nvidia-preview-mpatelka-gym-compare-v0.docs.buildwithfern.com/nemo/gym

Here are the markdown pages you've updated:

@mpatel31415
mpatel31415 force-pushed the mpatelka/gym-compare-v0 branch from e9386ce to 8274324 Compare August 24, 2026 20:17
@mpatel31415
mpatel31415 force-pushed the mpatelka/gym-compare-v0 branch from 8274324 to 824fbf7 Compare August 25, 2026 07:04
@mpatel31415
mpatel31415 marked this pull request as ready for review August 25, 2026 07:04
@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Aug 25, 2026

@giuliolovisotto giuliolovisotto left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpatel31415 a number of small issues found by agents in these threads. I suggest you just point your agent to the threads.

Comment thread nemo_gym/comparison/diff.py Resolved
Comment thread nemo_gym/comparison/diff.py Resolved
Comment thread nemo_gym/comparison/runner.py Resolved
Comment thread nemo_gym/comparison/diff.py Resolved
Comment thread nemo_gym/comparison/diff.py Resolved
Comment thread nemo_gym/cli/main.py Resolved
Comment thread nemo_gym/comparison/schema.py Resolved
Comment thread nemo_gym/comparison/diff.py Resolved
Comment thread nemo_gym/comparison/runner.py Resolved
@github-actions github-actions Bot removed the sla:review-overdue Review response is over the one-business-day SLA label Aug 26, 2026
@giuliolovisotto

Copy link
Copy Markdown
Contributor

For the record alongside the review: the happy path was validated end-to-end, not just statically. Two live GPQA eval runs were collected against a hosted inference endpoint (--limit 30, 32 repeats/task, 120 rollouts each, zero failures), and gym eval compare at 824fbf7 was run on the real artifacts. Everything worked: sibling metrics discovery, agent selection, binary-mode detection from real 0/1 rewards, correct flip accounting (4 common tasks, 0 flips — the runs agree within noise, mean/reward 0.983 vs 0.975 with overlapping 95% CIs), CI columns exactly where the footnote says they should be, and both report artifacts plus the terminal recap rendering correctly.

The findings in the review were each verified by executing this PR's compare pipeline (details in the inline threads); this comment is just to confirm the feature itself works well on real runs — nice work. Two review points were also visible live in the real output: the "Drop" column header over signed deltas, and the report-size scaling (156 KB JSON / 190-row details table for a 4-task comparison, via pass@k metric fan-out — see the thread on diff.py:272).

@giuliolovisotto giuliolovisotto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review at e53ace4: all 14 threads addressed and now resolved.

Verification: the six behavioral fixes were re-verified by re-running the original executable repros against this head — key-metric union (renamed wer row now present), output-dir resolution (stays under cwd with NEMO_GYM_EXTRA_ROOTS set), avg_sample_std_dev filtering, _looks_binary half-present min/max (now binary), the shared Δ (cand − base) header, and the flip reward-list cap (400-task × 8-repeat report shrank 267→124 KiB with counts intact). The remaining fixes (writer migration to aggregate_metrics_path_for, did_you_mean reuse, docs "1", explicit field=FLIP_FIELD, dead-filter cleanup, secret redaction in the provenance command) verified by reading the new diff — all good, and the compare test suite passes locally (166/166). The join-guard deferral to FEP-1461 and the comma-flag decision both make sense as scoped calls.

Formal approval to follow separately — holding it only until the currently red unit-test CI on this head is sorted.

@mpatel31415
mpatel31415 requested a review from a team as a code owner August 28, 2026 11:49
@mpatel31415
mpatel31415 force-pushed the mpatelka/gym-compare-v0 branch from e53ace4 to 66be8cf Compare August 28, 2026 11:49
Base automatically changed from mpatelka/add-variability-statistics to main August 28, 2026 12:19
Squashed and rebased onto the rewritten mpatelka/add-variability-statistics
tip to replace a merge-commit-heavy history with a single clean commit
carrying the net PR changes.

Signed-off-by: Martyna Patelka <mpatelka@nvidia.com>
group_level_metrics's num_rollouts/expected_num_rollouts/rollout_infos
were keyed off a stale task_idx left over from an earlier loop instead
of group_key, so per-agent fan-out groups (and any task processed
after the last one in iteration order) reported the wrong counts.

Signed-off-by: Martyna Patelka <mpatelka@nvidia.com>
@mpatel31415
mpatel31415 merged commit 44181d3 into main Aug 31, 2026
40 checks passed
@mpatel31415
mpatel31415 deleted the mpatelka/gym-compare-v0 branch August 31, 2026 19:02
jkyi-nvidia pushed a commit that referenced this pull request Sep 11, 2026
<!-- Thanks for contributing to NeMo Gym! Please fill out the sections
below. -->

## What does this PR do?

Adds `gym compare`, a new CLI command that diffs a baseline eval run
against a candidate run and writes a report.
Related epic: #1493 and issue
addressed by this PR: #2531

### Note
This to be fully completed needs statistical testing and [rollout
quality](https://rfc.frontier-evals.nvidia.com/r/gym-rollout-verification#ann=0da3dd8330c7),
this PR add a skeleton of the report and machine readible output file,
report deltas and ci.

Later output of statistical tests and  rollout quality work can be just
plugged in follow-up steps.

###  Output report example

[compare_report.md](https://github.com/user-attachments/files/31390538/compare_report.md)

## Checklist

- [x] I have read the [contributing
guidelines](https://docs.nvidia.com/nemo/gym/latest/contribute/development-setup).
- [x] The change is focused; unrelated "drive-by" edits are tracked as
separate issues/PRs.
- [x] Tests added or updated and pass locally, or N/A for docs-only /
non-code changes (so CI unit/server checks pass when applicable).
- [x] Pre-commit checks pass locally (`pre-commit run --all-files`) (so
CI lint/format/copyright pass).
- [x] All commits have DCO sign-off (`git commit -s`) (so the DCO check
passes).

---------

Signed-off-by: Martyna Patelka <mpatelka@nvidia.com>
Signed-off-by: Junkeun Yi <jkyi@nvidia.com>

This branch was previously deployed

1 inactive deployment
public — 9f2437d2 Deployed Aug 31, 2026 by copy-pr-bot[bot] via release / finalize / notify #2307
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