feat: swe with any harness - #2011
Merged
Merged
Conversation
Contributor
|
Assigning @Glorf for the sandbox API |
Glorf
previously approved these changes
Jul 24, 2026
Glorf
left a comment
Contributor
There was a problem hiding this comment.
The overall structure of this implementation looks sound to me. I'd recommend merging it as-is (as a boilerplate) and run the exact accuracy scores alignment with prior implementations/vs the leaderboards as a fast follow-up
cmunley1
force-pushed
the
cmunley1/anyswe2
branch
from
July 29, 2026 03:38
21d4dac to
1e86c9c
Compare
bxyu-nvidia
force-pushed
the
cmunley1/anyswe2
branch
from
July 29, 2026 22:41
1e86c9c to
e49542b
Compare
bxyu-nvidia
previously approved these changes
Jul 29, 2026
Signed-off-by: Christian Munley <cmunley@nvidia.com>
Signed-off-by: Christian Munley <cmunley@nvidia.com>
cmunley1
force-pushed
the
cmunley1/anyswe2
branch
from
July 30, 2026 04:42
37af1fc to
7a4870d
Compare
bxyu-nvidia
approved these changes
Jul 30, 2026
OlegSudakov
pushed a commit
to OlegSudakov/Gym
that referenced
this pull request
Aug 7, 2026
# anyswe_agent Update for NVIDIA-NeMo#1572 to use sandbox api Runs any Gym agent inside a SWE-style task container and evaluates the resulting `git diff HEAD` patch with the dataset harness. Works with `hermes_agent`, `claude_code_agent`, or another compatible Gym agent. # Quickstart From the repo root, create `env.yaml` for the policy model server: ```yaml policy_base_url: http://localhost:10240/v1 policy_api_key: EMPTY policy_model_name: nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 ``` Prepare 5 examples (tasks+images): ```bash python responses_api_agents/anyswe_agent/prepare.py --limit 5 ``` Start the environment: ```bash ng_run "+config_paths=[responses_api_agents/anyswe_agent/configs/anyswe_hermes.yaml,responses_api_models/vllm_model/configs/vllm_model.yaml]" \ ++anyswe_hermes.responses_api_agents.anyswe_agent.container_formatter='responses_api_agents/anyswe_agent/data/sifs/{instance_id}.sif' ``` Collect rollouts: ```bash ng_collect_rollouts \ +agent_name=anyswe_hermes \ +input_jsonl_fpath=responses_api_agents/anyswe_agent/data/swebench_verified.jsonl \ +output_jsonl_fpath=results/anyswe_rollouts.jsonl \ +limit=5 ``` Each rollout row contains `reward`, the full trajectory, and `mask_sample` for timeouts or unreliable rewards. # Agent wiring Point the config at the Gym agent server: ```yaml agent_server_module: responses_api_agents.hermes_agent.app agent_server_class: HermesAgent agent_config_class: HermesAgentConfig agent_kwargs: {max_turns: 100, terminal_backend: local} ``` Agent dependencies install once at startup into a portable prefix mounted inside the task container. Add `setup_scripts/<agent_dir>_deps.sh` for new agents. # Dataset and images `prepare.py` writes `data/swebench_verified.jsonl` and builds `data/sifs/{instance_id}.sif`. ```bash python responses_api_agents/anyswe_agent/prepare.py ``` Image builds require `apptainer`, network access to the SWE-bench registry, and substantial disk space. Use `--limit` and `--jobs N` while iterating. Dataset prep requires `pip install datasets`. Supported datasets: SWE-bench, SWE-bench Multilingual, R2E-Gym. --------- Signed-off-by: Christian Munley <cmunley@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.
anyswe_agent
Update for #1572 to use sandbox api
Runs any Gym agent inside a SWE-style task container and evaluates the resulting
git diff HEADpatch with the dataset harness. Works withhermes_agent,claude_code_agent, or another compatible Gym agent.Quickstart
From the repo root, create
env.yamlfor the policy model server:Prepare 5 examples (tasks+images):
Start the environment:
Collect rollouts:
Each rollout row contains
reward, the full trajectory, andmask_samplefortimeouts or unreliable rewards.
Agent wiring
Point the config at the Gym agent server:
Agent dependencies install once at startup into a portable prefix mounted inside
the task container. Add
setup_scripts/<agent_dir>_deps.shfor new agents.Dataset and images
prepare.pywritesdata/swebench_verified.jsonland buildsdata/sifs/{instance_id}.sif.Image builds require
apptainer, network access to the SWE-bench registry, andsubstantial disk space. Use
--limitand--jobs Nwhile iterating. Datasetprep requires
pip install datasets.Supported datasets: SWE-bench, SWE-bench Multilingual, R2E-Gym.