Skip to content

fix(swe): mask evaluator launch failures - #4002

Merged
cmunley1 merged 2 commits into
NVIDIA-NeMo:mainfrom
wdykas:fix/mask-swe-evaluator-launch-failures
Oct 8, 2026
Merged

cmunley1 merged 2 commits into
NVIDIA-NeMo:mainfrom
wdykas:fix/mask-swe-evaluator-launch-failures

Conversation

@wdykas

@wdykas wdykas commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Exclude SWE rollouts from training when the evaluator process fails before its script starts. Currently, a completed agent patch followed by an evaluator launch failure becomes reward=0 with mask_sample=False, treating an unmeasured result as a valid policy failure.

Record eval_launch_failed when evaluation raises and its per-episode startup marker is absent, then include that flag in the existing masking decision. Every supported evaluator writes this marker before model-dependent setup or tests. Preserve both the public and legacy mask fields through the existing response path.

Ordinary failed tests remain valid zero rewards. Post-start script failures retain existing behavior because they can be caused by the submitted patch; this change does not classify every evaluator exception as infrastructure failure. No separate issue is needed for this focused, reproduced defect.

Validation

  • python -m pytest responses_api_agents/swe_agents/tests/test_app.py -q: all 189 tests passed.
  • python -m pytest responses_api_agents/swe_agents/tests/test_app.py -k TestEvaluatorLaunchFailure -q: 4 passed. Tests exercise the native evaluation, response assembly, and verification path; check both masks and token preservation; and cover legacy metrics and legitimate negative results.
  • pre-commit run --all-files: passed.
  • Controlled native subprocess reproduction using an actual retained model trajectory: evaluator launch exit 255 -> masked zero; completed failed tests -> unmasked zero; successful tests -> unmasked one; timeout -> masked zero; post-start script failure -> unchanged unmasked zero. All five cases pass against this branch.
  • Independent source review verified marker ordering in all eight supported evaluator implementations.

Rollouts

The reproduction retains an actual completed OpenHands trajectory with a nonempty patch and 11,283 generated tokens. It replaces the evaluator process outcome, then passes through native response assembly. A downstream configured training check demonstrates that excluding the failed-evaluation row removes 3,221 trainable message-penalty positions while preserving the healthy sibling.

Checklist

  • I have read the contributing guidelines.
  • The change is focused.
  • Focused regression tests pass locally.
  • Documentation: N/A; existing mask semantics are unchanged.
  • Pre-commit checks pass locally.
  • No new source files.
  • Commit includes DCO sign-off.

@copy-pr-bot

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

@wdykas
wdykas marked this pull request as ready for review October 8, 2026 16:55
@wdykas

wdykas commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@sdevare-nv could I get a review on this simple one as well

@cmunley1

cmunley1 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

/ok to test 5facc6d

@cmunley1

cmunley1 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

/ok to test b6bddcd

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

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

Merged via the queue into NVIDIA-NeMo:main with commit 8555fc3 Oct 8, 2026
43 of 46 checks passed

This branch was previously deployed

1 inactive deployment
public — b6bddcd0 Deployed Oct 8, 2026 by copy-pr-bot[bot] via release / finalize / notify #4772
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