Repository navigation
fix(swe_agents): name the failure_kind of masked samples - #5342
Conversation
|
/ok to test e25bccf |
|
/ok to test 5c760fd |
5c760fd to
deb0266
Compare
|
/ok to test deb0266 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM — no concerns found. I reviewed all four changed files and traced the metric producers, failure-kind definitions, public exports, and response serialization. The mask conditions and reward calculation remain unchanged, and the new diagnostics reach the verify response. The tests cover classification precedence and diagnostic propagation.
Static review only; I couldn't execute tests or independently verify the reported validation results.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
swe_agents masks a sample for six conditions but left failure_kind empty, so a consumer could not tell an agent limit from an infrastructure failure. The mask decision now goes through _masked_failure, which returns the kind and reason of the first matching condition; failures that leave the reward unmeasured come first. The mask itself is unchanged. Part of #4882. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Yuhe Zhang <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
deb0266 to
7c75160
Compare
|
/ok to test 7c75160 |
|
/ok to test 70b1ce3 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42073150613 |
|
/ok to test 78510e7 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42078176145 |
What does this PR do?
Third slice of #4882 (parent #3180), after #5223 and #5315.
swe_agentsmasks a sample for six conditions but leavesfailure_kindempty, so a consumer can't tell the agent's own limits from infrastructure failures. NVIDIA-NeMo/RL#4968 adds an opt-in GRPO mode that keeps a masked sample in the advantage calculation only if itsfailure_kindis a policy failure. Without a kind, everyswe_agentsmask is treated as infrastructure. This PR names the kind and reason for each condition. The mask decision and rewards stay as they are.failure_kindprovider_unavailableprovider_oom_killedprovider_oom_killedswebench_tests_timeoutswe_agents:eval_timeoutswebench_agent_timeoutagent_timeoutmax_iterationerroragent_limitcontext_windowerrormodel_context_limit_masked_failure, which returns the kind and reason of the first match, in the table's order.SWEBenchWrapperInstanceConfigcarriesfailure_kindandfailure_reasonnext tomask_sample, andrun()copies them onto the verify response.Overlap with open PRs: #4034 (adds a mask for a runtime that dies before execution) and #4036 (opt-in
unfinished_episodes="fail") edit the same mask block. Whichever lands second should put its condition in_masked_failure. #4034's runtime death would map toprovider_unavailable.Validation
Against the final diff on Linux with Python 3.13.14, using the worktree environment with
dev,ray,tomlkit, andgprof2dotinstalled:TMPDIR=/tmp .venv/bin/gym env test +entrypoint=responses_api_agents/swe_agents +should_validate_data=true +skip_venv_if_present=true .venv/bin/pre-commit run --all-filesswe_agentstests passed. The component test command reused the prepared worktree environment.stuck_in_loop,other). The evaluation OOM/timeout cases now overlap with iteration/context limits, which can occur when the agent produces a patch and its evaluation then fails.process_single_datapoint→run()path returnsprovider_unavailableand a reason for a launch failure, and no kind for a completed eval.Rollouts
N/A. The mask decision is the same set of conditions as before, and rewards are unchanged; only diagnostic fields on masked results are added. The launch-failure test drives the real
process_single_datapoint→run()path.Compatibility and benchmark impact
None for scores. Masked
swe_agentsrows now carry afailure_kindandfailure_reason, andinstance_confighas the two new fields. With NeMo RL's default (include), training doesn't change. With RL#4968's opt-inexclude_infra, rows withagent_timeout,agent_limitormodel_context_limitnow count in advantages, and the other masked rows stay out. Their reward is the test result, so anagent_limitrow whose patch resolved the tests counts as 1.Checklist