SWE-bench Verified
A curated SWE-bench split for evaluating systems that resolve real software engineering issues.
SWE-bench Verified is run locally with the official `swebench` harness (Docker-based). You generate a predictions JSONL from your own model/agent, then `python -m swebench.harness.run_evaluation` builds per-instance Docker images, applies each model_patch, runs the repo test suite, grades resolution, and writes a report automatically. Scoring is folded into the run command — there is no separate report CLI. Keep the agent scaffold, model, tool access, dataset split (Verified), and harness/commit version attached to any reported % resolved.
1Install
git clone https://github.com/SWE-bench/SWE-bench.gitcd SWE-benchpython -m venv .venvsource .venv/bin/activatepip install -e .2Run evaluation
# Sanity-check the harness with gold patches first (requires Docker running):
python -m swebench.harness.run_evaluation --predictions_path gold --max_workers 1 --instance_ids sympy__sympy-20590 --run_id validate-gold# Then evaluate your own model. predictions.jsonl: one JSON object per line with fields instance_id, model_name_or_path, model_patch
python -m swebench.harness.run_evaluation --dataset_name SWE-bench/SWE-bench_Verified --predictions_path ./predictions.jsonl --max_workers 8 --run_id my-eval-run3Expected output
The run writes per-instance evaluation logs (including a per-instance report.json and test_output.txt) under logs/run_evaluation/<run_id>/<model_name_or_path>/<instance_id>/, and a final summary report JSON named <model_name_or_path>.<run_id>.json (slashes in the model name replaced by __). At the end it prints counts: total instances, instances submitted, instances completed, instances resolved, instances unresolved, instances with empty patches, and instances with errors. The % resolved (resolved / total) is derived from these counts and is specific to SWE-bench Verified — do not combine it with SWE-bench Lite or full SWE-bench numbers.
4Submit results
To appear on the official leaderboard, follow the submission instructions at https://github.com/SWE-bench/experiments (open a PR with your predictions and per-instance logs). Always report the agent scaffold, underlying model, tool access, dataset split (Verified), and the harness commit/version used, since these materially affect the score.