Add sandbox API and mini swe agent 2 resource agent#1377
Draft
hemildesai wants to merge 2 commits into
Draft
Conversation
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Parent PR: #1368
Refs #1337
This is the first smaller PR split out from #1368. It keeps the scope to the provider-neutral sandbox API, the OpenSandbox provider, and the Mini SWE Agent 2 evaluation integration. Observability is intentionally left out for a follow-up PR.
Features
nemo_gym.sandboxfacade with async and sync sandbox clients, provider registration, image rewrite support, sandbox specs/handles, and batch create support.responses_api_agents/mini_swe_agent_2, a sandbox-backed mini-swe-agent v2 integration for SWE-bench style evals, including sandbox resource profiles, task metadata propagation, reward aggregation, andng_collect_rolloutsusage docs.nemo-gym[sandbox]optional extra.Notes
data//results/paths.Validation
Completed on the squashed commit:
Result:
All checks passed!Result:
44 passed, 2 warningsuv run coverage run --source=nemo_gym.sandbox,responses_api_agents.mini_swe_agent_2 -m pytest tests/unit_tests/test_sandbox.py tests/unit_tests/test_opensandbox_provider.py responses_api_agents/mini_swe_agent_2/tests/test_app.py responses_api_agents/mini_swe_agent_2/tests/test_sandbox_environment.py -q uv run coverage combine results uv run coverage report --include='nemo_gym/sandbox/*,responses_api_agents/mini_swe_agent_2/*' --fail-under=90Result: focused coverage
92%.Kubernetes smoke validation:
Qwen/Qwen3.5-27B, served by SGLang with DFLASH draft modelz-lab/Qwen3.5-27B-DFlash.ng_collect_rolloutspath.pass@8=0.875, 7/8 tasks resolved, mean reward0.765625, eval error rate0.0, reward profile completion100%.Full SWE-bench Verified validation:
Qwen/Qwen3.5-27B, served by SGLang with DFLASH draft modelz-lab/Qwen3.5-27B-DFlash.step_limit=250, and OpenSandbox cleanup metadata.pass@1=0.698, 349/500 tasks resolved, mean reward0.698, eval error rate0.6, tests status rate99.0, reward profile completion100%.4h6m; rollout collection duration:4h04m.run_family=mini-swe2-firstpr-q35-cell-full-p1-r9orcleanup_id=full-p1-r9-single-20260521-053410.Known infra note:
HTTP 504for create requests even though it side-effects sandbox creation in the sandbox cluster. I stopped that smoke run and deleted the labeled leftover sandbox resources. The internal service path remains the validated path for this PR.