SWE-bench grades patches in Docker, and caches results by run id and instance id
SWE-bench: Can Language Models Resolve Real-world Github Issues?
At a glance
- What is it?
- SWE-bench is an MIT licensed Python benchmark of real GitHub issues for evaluating language models, with a containerized harness, four dataset aliases, and a result cache keyed only on run_id and instance_id that will quietly reuse an old grade if you reuse the id.
- Who is it for?
- SWE-bench fits researchers who need a defensible, reproducible number for patch generation and can afford the disk and CPU cost, and the gold patch mode is the right first command for anyone checking their harness is wired up correctly. It is not a unit test suite you can run on a laptop, and arm64 remains experimental.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 65 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- SWE-bench/SWE-bench6,233 ★ · +336
| Repository | 2026-09-23 | 2026-11-22 |
|---|---|---|
| SWE-bench/SWE-bench | 5.9k | 6.2k |
336 Stars in the last 60 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The v5 CLI builds images from a task repo, so a plain install leaves you short
Installing the package is not the whole setup, and the reason is architectural: the v5 CLI builds images from a local task repository. The documented build and first run are these two blocks:
git clone [email protected]:SWE-bench/SWE-bench.git
cd SWE-bench
pip install -e .
# Required for local image builds with the v5 CLI. This path is only an example.
git clone --depth 1 https://github.com/SWE-bench/swe-bench-tasks.git ./swe-bench-tasks
swebench dataset check ./swe-bench-tasksswebench eval verified --gold \
-i sympy__sympy-20590 \
--run-id validate-gold \
--task-repo ./swe-bench-tasksThe dataset check against the local tasks path is what catches a broken setup before you spend hours on containers, and the note about that path being only an example matters because any local checkout location works. The validation run evaluates a single instance with the gold flag, so you can confirm the harness end to end without generating any predictions at all. There is also a legacy invocation, python -m swebench.harness.run_evaluation, which still works and takes the same arguments.
Results are cached on run_id and instance_id only, so a changed diff is silently ignored
This is the sharpest edge in the harness. Caching keys on run_id and instance_id and nothing else. Run the same instance under the same run_id a second time, with a completely different prediction diff, and the harness reuses the cached outcome from the first run without re-evaluating anything. The only documented remedy is to use a different run_id. In practice that means a run_id is not a label you can reuse for a second attempt at the same problem, which is exactly the workflow a human would reach for when iterating on a single failing instance. Anything that groups several prediction sets under one identifier will produce a table of numbers where some rows were never recomputed. Treat run_id as consumed once it has graded.
Docker became mandatory in June 2024, and arm64 support is still called experimental
The harness moved to a fully containerized evaluation using Docker for reproducibility in June 2024, with support from the OpenAI Preparedness team, and that decision is the reason the resource requirements exist today. The stated recommendation is an x86_64 machine with at least 120GB of free storage, 16GB of RAM and 8 CPU cores, and on Docker Desktop you have to raise the virtual disk space to roughly 120 free GB yourself. Worker count has a formula attached rather than a constant: stay under min(0.75 times the CPU count, 24) for max_workers, and keep it consistent with the CPUs Docker can actually see. Support for arm64 machines is explicitly experimental, and on an M-series Mac or other ARM system the instruction is to pass the task repo flag so images are built locally with Docker Buildx. Running this on a laptop is the case the documentation is warning against, not supporting.
Four dataset aliases plus any identifier, and unrecognised values pass straight through
The dataset argument is deliberately permissive. It accepts an alias, and four are named: full, verified, multimodal, and multilingual. It also accepts a HuggingFace id or a local path. Anything else is passed through exactly as given, which is why a repository style name such as SWE-bench/SWE-bench_Lite works without special handling. That flexibility is convenient and it is also where score comparisons get muddy, because nothing stops you from typing an arbitrary identifier and reporting the result under the same heading as the standard splits. The aliases carry real differences in what they measure. Verified is a subset of 500 problems that real software engineers confirmed are solvable, published as part of a collaboration with OpenAI Preparedness in August 2024. Multimodal is the visual software domain set, with a v2 announced as fully open source in September 2026 with 480 tasks available for local evaluation. Multilingual is a separate axis again.
Predicting, building images, publishing and re-grading are four separate commands
The CLI is split so that each expensive step is its own subcommand. Evaluation takes a prediction path, a run id and a worker count: swebench eval verified -p path -j count. Prediction generation is separate, through swebench infer, which takes a model name, an output directory and a worker count, and uses mini-SWE-agent. Image management has its own three verbs: build pulls or builds ahead of time, check verifies images exist on the registry, and clean removes leftover containers for a given run. Publishing is separate again with swebench submit, which takes a run id and a HuggingFace bucket in user/bucket form. Reporting is also separate: swebench report re-grades saved logs without starting containers at all. Two log trees appear in the working directory, logs/build_images and logs/evaluation, and the run summary lands at logs/evaluation/<run_id>/results.json.
Gold patches exist as a mode, which makes the harness self testable
The most useful line in the usage section is a flag rather than a dataset. Passing --gold evaluates the benchmark's own reference patches instead of anything a model produced, and the setup instructions use exactly that to validate a fresh installation. The documented calls show gold mode on both the verified split and on multimodal, where a single multimodal instance is named directly. This turns the harness into its own regression test: if gold patches do not score as resolved on your machine, the problem is your environment, your task repo, or your worker count rather than the system under evaluation. That distinction is the difference between a number you can report and a number you have to debug first, and it costs one instance rather than a full run. The related inference path also exists for people who want predictions without writing a harness around the model themselves.
Optional dependency groups decide whether datasets, inference, tests or docs work at all
The declared dependencies cover the harness itself: docker, datasets, GitPython, huggingface_hub, beautifulsoup4, chardet, unidiff, rich, typer, tenacity, tqdm, PyYAML and a few others, on Python 3.10 and above. One pin carries a comment explaining itself: ghapi is held below version 2 because the 2.x line is asynchronous and every call returns a coroutine. Then four optional groups decide what else you can do. A datasets group adds transformers, tiktoken, sentencepiece, openai, anthropic and litellm. An inference group adds torch, peft, triton and flash_attn. A test group adds pytest and pytest-cov, and a docs group pulls in the mkdocs toolchain including the theme package, mike and mkdocstrings. The install line you run decides your capabilities, and a pyproject.toml comment notes that uv installs a group by default so `uv run swebench infer` works in a checkout.
Editorial conclusion
SWE-bench fits researchers who need a defensible, reproducible number for patch generation and can afford the disk and CPU cost, and the gold patch mode is the right first command for anyone checking their harness is wired up correctly. It is not a unit test suite you can run on a laptop, and arm64 remains experimental. Before trusting any score, use a fresh run_id per prediction set, confirm your machine meets the storage figure, and check whether the dataset you are reporting is verified, SWE-bench/SWE-bench_Lite, or the full split.
Frequently asked questions
What does "SWE bench" mean?
It is a benchmark for evaluating large language models on real world software issues collected from GitHub. The task shape is that a model is given a codebase and an issue, and must generate a patch that resolves the described problem.
Is the swe bench outdated?
The repository is not archived and the last push to main is dated 2026-09-18, so it is still receiving work. The dataset itself has also moved, with SWE-bench Multimodal v2 announced as fully open source with 480 tasks available for local evaluation on 2026-09-01.
Is being SWE bench verified good?
Verified is a subset of 500 problems that real software engineers confirmed are solvable, introduced in August 2024 as part of a collaboration with OpenAI Preparedness. It is a filtered slice of the same benchmark, offered separately from the full split.
What is terminal bench vs swe bench?
SWE-bench only covers what its own documentation describes: real GitHub issues in codebases, graded by whether a generated patch resolves them.
how to use swe bench
Install Docker, clone the repository, run pip install -e ., clone a task repo and check it with swebench dataset check, then validate with a gold patch run on a single instance. Predictions are evaluated with swebench eval taking a prediction path, a run id and a worker count, and every run needs a fresh run_id because results are cached by run_id and instance_id alone.
what is swe bench multilingual
It is one of the four dataset aliases the evaluation argument accepts, alongside full, verified, and multimodal, and it can also be passed as a HuggingFace id or a local path. There is a matching images check command for it, swebench images check multilingual, which verifies images exist on the registry.
Official sources
Where developers are discussing it
Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 0 in the last 30 days; newest first.
- OpenAI's SWE-bench harness relies on unisolated host Docker socketsHacker News · Sep 15, 2026 · 3 points · 0 comments
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/swe-bench-swe-bench)Star history chart for your README
[](https://hysenlabs.com/projects/swe-bench-swe-bench)Was this useful?