Skip to content

feat(eval): batch swe-bench and core benchmark runs - #3201

Merged
fsiino-nvidia merged 39 commits into
mainfrom
fsiino/batched-evals
Oct 5, 2026
Merged

fsiino-nvidia merged 39 commits into
mainfrom
fsiino/batched-evals

Conversation

@fsiino-nvidia

@fsiino-nvidia fsiino-nvidia commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Separate benchmark jobs each reserve GPUs and load the same model, even though individual benchmarks alternate between model requests and other work, such as running tests or waiting for a grading service. Sharing a deployment gives other benchmarks an opportunity to use that capacity and reduces the number of GPUs needed at the same time.

This PR lets several benchmarks share one model-serving deployment and GPU allocation in NeMo Gym, while keeping their tasks and scores separate. Instead of starting a separate copy of the model for every benchmark, Gym schedules their evaluation attempts together and saves progress so an interrupted batch can resume without repeating completed work when explicitly configured to reuse that output.

Scope

Batch Benchmarks Excludes
Core Tau2, Tau3 banking, SciCode, HLE, GPQA Diamond, Omniscience, AA-LCR, APEX math shortlist, LMArena v2, LiveCodeBench v6, IFBench GDPVal
SWE SWE-bench Verified and SWE-bench Multilingual SWE-bench Pro

SWE-bench Pro remains standalone and is explicitly excluded. One node has 4 GPUs.

Implementation

  • Add explicit suite configurations and interleave evaluation attempts across benchmarks under one shared concurrency limit: 512 for core and 1,024 for SWE.
  • Preserve each benchmark's repeat/seed settings and metrics; one benchmark's aggregation failure does not discard the others' metrics.
  • Keep optional manifest/status tracking through batch_manifest_fpath and batch_status.json.
  • Provide a reusable Gym-only entrypoint, benchmarks/nemotron_3.5_super/submit_batch.sh, with configurable checkpoint, container, and Slurm settings. Run recipes and serving configuration replace dependencies on local pilot helpers or earlier jobs. The launcher checks configuration before submission and reuses prebuilt server environments; missing environments fail before preparation rather than triggering installation.
  • Keep the allocation walltime configurable while retaining main's timestamped output defaults and existing resume mechanism: explicitly point ROLLOUTS_FPATH at the saved output and pass ++resume_from_cache=true. Job termination follows normal Slurm behavior.

Validation and resource usage

  • Allocation: 4 nodes / 16 GPUs per batch, with two nodes processing prompts and two generating answers.
  • Savings: SWE peak demand dropped from 32 to 16 GPUs (50%) versus running both standalone jobs concurrently. Core fit all 11 benchmarks on 16 GPUs.
  • Scope update: Per-agent collection caps have been removed; the original full-core pilots used those caps. A GPU smoke of HLE, Omniscience, GPQA, and LMArena (48 rollouts, nine checks) passed on the fixed recipe, and the final step-120 batch completed all 23,801 core attempts; matched score validation against standalone is below. Repeat/seed policies are unchanged.
  • Latest configuration checks: The focused tests (902, covering rollout collection, rollout health, the base model, GDPVal multistage, the remote agent, the launcher, and benchmark preparation) passed on the revision after the latest merge of main. All-files pre-commit and CI remain pending on the latest head.
  • Recipe compatibility: HLE extraction (answers over 8,192 characters become empty judge input), Omniscience's 2,048-token judge budget, and LMArena's 1% failure threshold now match the reference. LMArena's generation defaults are written into its prepared rows instead of a suite-wide config block, which had been overriding other members' request settings. gym eval prepare now lets a prepare script define is_prepared_data_current, so with use_cached_prepared_benchmarks=true an LMArena file prepared before this change is prepared again. batched.sh exports the Mamba KV-transfer settings (VLLM_SSM_CONV_STATE_LAYOUT=DS and VLLM_USE_V2_MODEL_RUNNER=0) that main's launcher rewrite had moved into per-model configs. Remaining recipe differences and the historically tested vLLM/container setup are documented in benchmarks/nemotron_3.5_super/README.md. The scores below come from the final recipe.

Available benchmark scores

The final-recipe step-120 core batch and all 13 standalone benchmarks are complete. The seven resumed standalone benchmarks have all expected task attempts, matching final metrics, and no missing, duplicate, or unexpected result IDs. Standalone HLE was rerun with the batch's grader (GPT-4o, structured verdict, same 8,192-character rule).

Benchmark Step-120 batch Step-120 batch coverage Standalone, step-120 Standalone coverage Gap (batch − standalone) Within sampling variation
Tau2 79.72% 2,224/2,224 77.83% 2,224/2,224 +1.89 Yes (±1.98)
Tau3-Banking 16.88% 776/776 17.91% 776/776 -1.03 Yes (±3.14)
Tau3-Average 64.23% 3,000/3,000 62.81% 3,000/3,000 +1.42 Not assessed
SciCode (subtask accuracy) 44.88% 520/520 45.44% 520/520 -0.56 Yes (±2.46)
AA-LCR 59.00% 1,600/1,600 55.81% 1,600/1,600 +3.19 No (±2.41)
AA-Omniscience (OmniIndex, pass@10) 37.50% 6,000/6,000 36.83% 6,000/6,000 +0.67 Not assessed
AA-Omniscience Non-Hall (%, avg-of-10) 53.78% 6,000/6,000 52.85% 6,000/6,000 +0.93 Yes (±1.09)
GPQA Diamond 88.13% 1,584/1,584 88.19% 1,584/1,584 -0.06 Yes (±1.35)
CritPt N/A Not included in either batch N/A N/A N/A N/A
HLE w/o tool (text) 26.18% 2,158/2,158 26.46% 2,158/2,158 -0.28 Yes (±2.68)
APEX math shortlist 83.78% 752/752 85.90% 752/752 -2.13 Yes (±2.98)
LMArena v2 26.39% 4,425/4,425 25.99% 4,425/4,425 +0.40 Yes (±2.25)
LiveCodeBench v6 86.42% 1,362/1,362 86.71% 1,362/1,362 -0.29 Yes (±1.58)
IFBench 73.73% 2,400/2,400 74.44% 2,400/2,400 -0.71 Yes (±1.68)

Both columns use the same checkpoint and matched settings, and the batch column is a single run of all 11 core benchmarks. A gap is within sampling variation when it is at most twice the combined standard error, computed from the spread across repeats (task-level for HLE, which has one repeat); the allowed band is shown in parentheses. Tau3-Average and OmniIndex are derived metrics with no per-repeat version, so they are not assessed; their components are within variation. AA-LCR is the only benchmark outside the band, and its cause has not been identified. Remaining differences are the serving flags, judge concurrency, and standalone HLE running on current main while the other standalone runs used the pre-batching baseline.

SWE-bench comes from a separate batch. The 09-16 SWE batch ran before main's later SWE harness changes, and it keeps eight infrastructure-flagged attempts.

Benchmark Step-120 batch Step-120 batch coverage Standalone, step-120 Standalone coverage Gap (batch − standalone) Within sampling variation
SWE-bench Verified 70.20% 1,500/1,500 69.20% 1,500/1,500 +1.00 Yes (±1.51)
SWE-bench Multilingual 67.56% 900/900 67.78% 900/900 -0.22 Yes (±3.12)

Run commands (Gym only)

Run uv sync --frozen --extra dev first and make the required benchmark data available in the checkout. Supply OpenSandbox credentials through untracked env.yaml or exported OPENSANDBOX_DOMAIN and OPENSANDBOX_API_KEY; core also needs nv_inference_api_key in env.yaml or exported NV_INFERENCE_API_KEY. No root-level pilot files or historical-job IDs are required. Container, checkpoint, data, and remote OpenCode asset requirements are documented in benchmarks/nemotron_3.5_super/README.md.

Core batch

env -u EXPERIMENT_NAME -u ROLLOUTS_FPATH \
  MODEL=/lustre/fsw/portfolios/llmservice/users/jiaqiz/launch_scripts_super_v35/eval/conversion/converted_ckpt/grpo_superv3_5_rlvr_v43_broad_falcon_r3-oci-hsg-20260905-r1/step_120/hf \
  MODEL_NAME=super35-step120 \
  CONTAINER=/shared/containers/super35-batches.sqsh \
  SBATCH_ACCOUNT=nemotron_rl_algo \
  SBATCH_PARTITION=batch_long \
  SBATCH_TIMELIMIT=20:00:00 \
  NUM_PREFILL_NODES=2 NUM_DECODE_NODES=2 \
  bash benchmarks/nemotron_3.5_super/submit_batch.sh core

SWE-bench Verified + Multilingual batch

env -u EXPERIMENT_NAME -u ROLLOUTS_FPATH \
  MODEL=/lustre/fsw/portfolios/llmservice/users/jiaqiz/launch_scripts_super_v35/eval/conversion/converted_ckpt/grpo_superv3_5_rlvr_v43_broad_falcon_r3-oci-hsg-20260905-r1/step_120/hf \
  MODEL_NAME=super35-step120 \
  CONTAINER=/shared/containers/super35-batches.sqsh \
  SBATCH_ACCOUNT=nemotron_rl_algo \
  SBATCH_PARTITION=batch_long \
  SBATCH_TIMELIMIT=20:00:00 \
  NUM_PREFILL_NODES=2 NUM_DECODE_NODES=2 \
  bash benchmarks/nemotron_3.5_super/submit_batch.sh swe

Append --check to either command to validate local paths and configuration without submitting a job or installing dependencies.

Remaining TODOs

  • Finish EFB integration validation in its separate repository. Last recorded status: SWE submission, collection, and accounting passed; the core GPU pilot and controlled EFB stop/resume exercise remained pending. When adopting this Gym revision, migrate EFB's environment-only resume setup to the explicit Hydra override ++resume_from_cache=true, retaining the experiment name and output path. Release certification is separate from this Gym PR.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Final whole-PR tests and CI pass; the focused launcher tests passed.
  • All-files pre-commit passes on the latest merged revision.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

Group the 11 core-text benchmarks into a shared suite with concurrency 512.
Group SWE-bench Verified and Multilingual with concurrency 1024.
Keep SWE-bench Pro as a standalone evaluation.
Add tests covering suite membership, defaults, and config resolution.

Signed-off-by: Frankie Siino <[email protected]>
Make the Slurm wall time configurable while preserving the four-hour default.
Reuse completed rollouts through a stable output path and Gym’s resume cache.
Stop cleanly before the deadline and return status 75 for resumable runs.
Keep vLLM and OpenSandbox cleanup behavior intact.

Signed-off-by: Frankie Siino <[email protected]>
Schedule batched evaluations round-robin using each resolved agent.
Preserve task indexes, repeat seeds, and resume identities.
Create async tasks deterministically before they enter the concurrency limit.
Keep materialized inputs and lower-level caller ordering unchanged.

Signed-off-by: Frankie Siino <[email protected]>
Keep the run-wide concurrency limit as the overall ceiling.
Allow named agents to use narrower limits for constrained services.
Reject invalid limits and agent-name mistakes before dispatch begins.
Test limit enforcement without weakening scheduling or resume behavior.

Signed-off-by: Frankie Siino <[email protected]>
Preserve successful metrics when another agent fails aggregation.
Write a clear error entry for each affected agent.
Keep aggregate artifacts deterministic and safe to consume.
Allow standalone aggregation to replace errors after recovery.

Signed-off-by: Frankie Siino <[email protected]>
Validate EFB manifests against materialized inputs before dispatch.
Track rollout progress, classified failures, repeat policy, and metrics per agent.
Write secret-safe status updates atomically during collection and aggregation.
Allow standalone aggregation to repair and refresh the final batch status.

Signed-off-by: Frankie Siino <[email protected]>
Allow repeat seeds to be enabled only for selected agents.
Keep the existing global boolean behavior for current configurations.
Support routing-aware defaults and flag missing or unused agent names.
Prevent seed metadata from leaking between fan-out targets.

Signed-off-by: Frankie Siino <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Sep 10, 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.

Remove RESUME_EVAL_ON_REQUEUE and PREDEADLINE_SECONDS.
  Restore timestamped output paths and explicitly configured resume.
  Keep configurable walltime and existing cleanup behavior.
  Replace obsolete deadline tests with focused launcher regressions.

Signed-off-by: Frankie Siino <[email protected]>
Describe the core and SWE batches and their shared GPU allocation.
  Add short examples for concurrency, repeats, and completion checks.
  Clarify which additional settings are needed to reproduce a run.

Signed-off-by: Frankie Siino <[email protected]>
@fsiino-nvidia fsiino-nvidia changed the title Fsiino/batched evals 09082026 feat(eval): batch swe-bench and core benchmark runs Sep 16, 2026
@fsiino-nvidia
fsiino-nvidia marked this pull request as ready for review September 16, 2026 01:01
@yaoyu-33 yaoyu-33 added area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters complexity:high Cross-component or shared-contract change with a large review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Sep 16, 2026
Make checkpoint, container, and Slurm settings caller-configurable.
  Include core and SWE recipes with dependency setup before evaluation.
  Preserve explicit resume behavior and safely forward configuration overrides.
  Document launch commands and add focused regression tests.

Signed-off-by: Frankie Siino <[email protected]>
@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Sep 17, 2026
@yaoyu-33

yaoyu-33 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Do you have complete standalone-vs-batch test results using the same checkpoint and evaluation settings? We should confirm that batching preserves per-benchmark scores (within expected sampling variation) and evaluation behavior. The provided sheet above seems incomplete.

Comment thread nemo_gym/rollout_collection.py Resolved
Comment thread nemo_gym/batch_status.py Resolved
Comment thread nemo_gym/rollout_collection.py Resolved
Comment thread nemo_gym/rollout_collection.py Resolved
@github-actions github-actions Bot removed the sla:review-overdue Review response is over the one-business-day SLA label Sep 18, 2026
@github-actions github-actions Bot removed the sla:author-overdue Author response is over the one-business-day SLA label Oct 2, 2026

@yuhezhang-ai yuhezhang-ai 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.

Thanks for addressing the earlier feedback. I rechecked 67353cff: the GDPVal error handling, dictionary seed policy, and cross-benchmark request-default issues are fixed. The scoring alignment and compatibility documentation also address the earlier requests.

There is one remaining follow-up concerning existing cached LMArena datasets, described inline. Could we cover that migration path before approval? Once it is addressed and the merge conflicts are resolved, please run the required checks on the resulting revision; the available full CI results still cover the older head.

Comment thread benchmarks/lmarena_v2/prepare.py Resolved
…efaults

Let a prepare script define is_prepared_data_current so gym eval prepare does not reuse a cached file made by older code when use_cached_prepared_benchmarks is on. LMArena's check requires every row to carry the generation defaults, which now come from one shared dictionary. Test the stale and current paths through prepare_benchmark.

Signed-off-by: Frankie Siino <[email protected]>
Signed-off-by: Frankie Siino <[email protected]>

# Conflicts:
#	nemo_gym/rollout_collection.py
@fsiino-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test e28d067

@fsiino-nvidia

Copy link
Copy Markdown
Contributor Author

Once it is addressed and the merge conflicts are resolved, please run the required checks on the resulting revision; the available full CI results still cover the older head.

@yuhezhang-ai Reran on the new head e28d067

@yuhezhang-ai yuhezhang-ai 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.

Thanks for addressing the review feedback. The cached-data fix resolves my remaining concern, and the focused tests and latest CI pass. Looks good to me.

@yuhezhang-ai

Copy link
Copy Markdown
Contributor

Hi @bxyu-nvidia can you take a final look to approve?

@fsiino-nvidia
fsiino-nvidia added this pull request to the merge queue Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/37358459019

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 5, 2026
@yuhezhang-ai
yuhezhang-ai added this pull request to the merge queue Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/37366052493

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 5, 2026
@fsiino-nvidia
fsiino-nvidia added this pull request to the merge queue Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/37380491945

Merged via the queue into main with commit 070dc1e Oct 5, 2026
44 checks passed
@fsiino-nvidia
fsiino-nvidia deleted the fsiino/batched-evals branch October 5, 2026 22:22
ehosseiniasl pushed a commit to ehosseiniasl/Gym that referenced this pull request Oct 9, 2026
…o#3990)

Hydra overrides containing inline dictionaries were expanded by Bash
inside the generated Slurm evaluation command. A dataset override could
become several arguments and fail configuration validation before
evaluation began. Serialize each caller argument with Bash `%q` so both
`gym eval prepare` and `gym eval run` receive it literally, including
spaces, quotes, and newlines.

Update `submit_batch.sh` to pass its original argument array to the
launcher, avoiding double escaping when used with the batch entrypoint
from NVIDIA-NeMo#3201. Keep the serialized `GYM_BATCH_ARGS` for its dependency
check.

The generated commands preserve argument boundaries in preparation,
evaluation, and the batch dependency check. Cluster smoke validation is
pending. No separate issue is needed for this self-contained launcher
repair.

Signed-off-by: Frederic Lafrance <[email protected]>

This branch was previously deployed

1 inactive deployment
public — e28d0677 Deployed Oct 2, 2026 by copy-pr-bot[bot] via release / finalize / notify #4225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters complexity:high Cross-component or shared-contract change with a large review surface feature New capabilities, enhancements, or enablement work ready-to-merge PR is approved, current, and waiting for final CI or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants