--- language: - en license: cc-by-4.0 task_categories: - text-generation pretty_name: SWE-rebench-V2 tags: - software-engineering - code - swe - rl --- # SWE-rebench-V2 [![GitHub](https://img.shields.io/badge/research--environments-swerebench__v2__v1-181717?logo=github)](https://github.com/PrimeIntellect-ai/research-environments/tree/main/environments/swe/swerebench_v2_v1) Full re-upload of Nebius's [SWE-rebench-V2](https://huggingface.co/datasets/nebius/SWE-rebench-V2) ([paper](https://arxiv.org/abs/2602.23866)): **32,076 / 32,079** freshly-mined GitHub PR tasks across 17 languages. Unfiltered mirror for large-scale runs; the curated RL subsets are [`SWE-rebench-V2-Filtered-Verified`](https://huggingface.co/datasets/PrimeIntellect/SWE-rebench-V2-Filtered-Verified) and [`SWE-rebench-V2-Filtered-Easy-Verified`](https://huggingface.co/datasets/PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified). ## Changes vs upstream * Dropped exactly 3 rows whose Docker Hub image no longer exists upstream (`dhi-mikeio` tags `227-50037f2`, `442-3f8bb64`, `690-7882682` — manifests return `denied`; list ships as `swe-rebench-v2-dead-upstream-images.json`). Nothing else is filtered. License mirrors upstream: CC-BY-4.0. ## Splits | Split | Rows | |---|---:| | `train` | 32,076 | ## How to use Install the [`swerebench_v2_v1`](https://github.com/PrimeIntellect-ai/research-environments/tree/main/environments/swe/swerebench_v2_v1) taskset from [research-environments](https://github.com/PrimeIntellect-ai/research-environments), then run it end-to-end with [verifiers](https://github.com/PrimeIntellect-ai/verifiers): ```bash uv pip install --prerelease=allow "git+https://github.com/PrimeIntellect-ai/research-environments.git#subdirectory=environments/swe/swerebench_v2_v1" uv run eval --taskset.id swerebench_v2_v1 -m -n 100 -r 4 ``` ## Generation
Reproduction script — swe-rebench-v2.py This dataset was created by running: ````bash uv run datasets/swe-rebench-v2.py -H ```` ````python # swe-rebench-v2.py """Re-upload `nebius/SWE-rebench-V2` (32k) minus upstream-dead images. Full mirror of the upstream train split with exactly one filter: a manually-curated blocklist at ``swe-rebench-v2-dead-upstream-images.json`` (sibling of this file) drops the 3 rows whose Docker Hub image no longer exists upstream (``dhi-mikeio`` tags 227-50037f2 / 442-3f8bb64 / 690-7882682 — manifest requests return ``denied``, checked 2026-07-17). Every other row is kept verbatim, including 68 rows whose images exist upstream but currently fail Prime platform sandbox-image conversion — that failure is prime-side and may be fixed, so those rows are not this dataset's problem to drop (the curated RL subsets `SWE-rebench-V2-Filtered-Verified` / `-Filtered-Easy-Verified` do exclude them). ``image_name`` is deliberately NOT rewritten to ``prime/primeintellect/...`` (unlike the filtered subsets): since the platform's 2026-07-15 org-less image migration (ENG-4518), Docker Hub source refs like ``docker.io/swerebenchv2/:`` resolve natively on Prime — and the 14k images imported after the migration exist in the registry *only* under those source refs, so a wholesale rewrite would point them at nonexistent names. Source refs are the one convention that covers every row on Prime, Docker, and Modal runtimes alike. Field source notes: * `problem_statement` is the raw GitHub issue body. * `pr_description` is the raw merged PR description. """ # /// script # requires-python = ">=3.12" # dependencies = ["datasets>=4.0.0", "jinja2"] # /// import argparse import json import sys import time from pathlib import Path from typing import cast from huggingface_hub import create_repo, upload_file, whoami from datasets import Dataset, load_dataset SOURCE_REPO = "nebius/SWE-rebench-V2" _DEAD_IMAGES_PATH = Path(__file__).parent / "swe-rebench-v2-dead-upstream-images.json" _DEAD_IMAGES = frozenset(json.loads(_DEAD_IMAGES_PATH.read_text())) def _normalize_image(image_name: str) -> str: # Dataset rows carry e.g. ``docker.io/swerebenchv2/foo-bar:tag``; the # blocklist omits the ``docker.io/`` prefix. Strip it for comparison. prefix = "docker.io/" return image_name[len(prefix) :] if image_name.startswith(prefix) else image_name def prepare_data() -> Dataset: ds = cast(Dataset, load_dataset(SOURCE_REPO, split="train")) return ds.filter( lambda ex: _normalize_image(ex.get("image_name") or "") not in _DEAD_IMAGES, num_proc=8, load_from_cache_file=False, ) def _swe_card(key: str): """Build this dataset's card from the shared SWE card registry (swe_cards.py).""" sys.path.insert(0, str(Path(__file__).resolve().parent)) from swe_cards import build_card return build_card(key) def push_card_to_hub(repo_name: str, push_to_hub: bool): card = _swe_card("swe-rebench-v2") if push_to_hub: print(f"Pushing card to `{repo_name}`") card.push_to_hub(repo_name, repo_type="dataset") print(f"✅ Pushed card to `{repo_name}` to HF Hub") else: print("ℹ️ Skipped pushing card to HF Hub. To push, use the `--push-to-hub` or `-H` flag.") def main(repo_name: str, push_to_hub: bool, private: bool): print(f"⚙️ Re-uploading {SOURCE_REPO} minus {len(_DEAD_IMAGES)} upstream-dead images") start_time = time.time() dataset = prepare_data() elapsed = time.time() - start_time print(f"✅ Kept {len(dataset):,} rows in {elapsed:.2f} seconds") if push_to_hub: create_repo(repo_name, private=private, repo_type="dataset", exist_ok=True) push_card_to_hub(repo_name, push_to_hub) dataset.push_to_hub(repo_name, private=private) upload_file( path_or_fileobj=str(_DEAD_IMAGES_PATH), path_in_repo=_DEAD_IMAGES_PATH.name, repo_id=repo_name, repo_type="dataset", ) print(f"✅ Pushed dataset to https://huggingface.co/datasets/{repo_name}") def check_write_access(org: str): is_authed = False try: info = whoami() token = info["auth"]["accessToken"]["displayName"] for entity in info["auth"]["accessToken"]["fineGrained"]["scoped"]: if entity["entity"]["name"] == org and "repo.write" in entity["permissions"]: is_authed = True except Exception: raise ValueError("❌ You are not logged in. Please run `hf auth login` or `export HF_TOKEN=...`") if not is_authed: raise ValueError(f"❌ Your current token `{token}` does not have write access to `{org}`") print(f"✅ Confirmed write access with token `{token}` to `{org}`") if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--username", "-U", default="PrimeIntellect", type=str, help="The username to push the dataset to." ) parser.add_argument("--dataset-name", "-D", default="SWE-rebench-V2", type=str, help="The dataset name.") parser.add_argument("--dataset-private", "-p", action="store_true", help="Whether to make the dataset private.") parser.add_argument("--push-to-hub", "-H", action="store_true", help="Whether to push the dataset to the hub.") args = parser.parse_args() assert len(args.dataset_name.split("/")) == 1, "Dataset name must not include the username" if args.push_to_hub: check_write_access(args.username) main( repo_name=f"{args.username}/{args.dataset_name}", push_to_hub=args.push_to_hub, private=args.dataset_private, ) ````
## Original Dataset Card Snapshot of the [`nebius/SWE-rebench-V2`](https://huggingface.co/datasets/nebius/SWE-rebench-V2) card at card-build time — see the live card for updates.
Original nebius/SWE-rebench-V2 dataset card # SWE-rebench-V2 ## Dataset Summary SWE-rebench-V2 is a curated dataset of software-engineering tasks derived from real GitHub issues and pull requests. The dataset contains 32,079 samples covering Python, Go, TypeScript, JavaScript, Rust, Java, PHP, Kotlin, Julia, Elixir, Scala, Swift, Dart, C, C++, C#, R, Clojure, OCaml, and Lua. For log parser functions, base Dockerfiles, and the prompts used, please see https://github.com/SWE-rebench/SWE-rebench-V2 The detailed technical report is available at [“SWE-rebench V2: Language-Agnostic SWE Task Collection at Scale”](https://arxiv.org/abs/2602.23866). ## Quick Start ```python from datasets import load_dataset ds = load_dataset("nebius/SWE-rebench-V2", split="train") print(len(ds)) # 32079 ``` ## Dataset Structure | Field | Type | Description | |---|---|---| | `instance_id` | `string` | Unique identifier for the instance | | `repo` | `string` | GitHub repository in `owner/repo` format | | `base_commit` | `string` | Git commit SHA of the base before the fix | | `patch` | `string` | The gold patch that resolves the issue | | `test_patch` | `string` | Diff adding or modifying tests that verify the fix | | `problem_statement` | `string` | Issue description the patch addresses | | `pr_description` | `string` | Full pull request description | | `created_at` | `int64` | Unix timestamp (milliseconds) of the issue/PR creation | | `image_name` | `string` | Docker image name used for the evaluation environment | | `language` | `string` | Primary programming language of the repository | | `interface` | `string` | Description of the code interface changed by the patch | | `license` | `string` | SPDX license identifier of the repository | | `FAIL_TO_PASS` | `list[string]` | Test IDs that fail before the patch and pass after | | `PASS_TO_PASS` | `list[string]` | Test IDs that pass both before and after the patch | | `install_config` | `struct` | Configuration needed to reproduce the test environment | | `meta` | `struct` | Metadata and LLM-generated quality annotations | # License The dataset is licensed under the Creative Commons Attribution 4.0 license. However, please respect the license of each specific repository on which a particular instance is based. To facilitate this, the license of each repository at the time of the commit is provided for every instance. # Citation ```bibtex @misc{badertdinov2026swerebenchv2languageagnosticswe, title={SWE-rebench V2: Language-Agnostic SWE Task Collection at Scale}, author={Ibragim Badertdinov and Maksim Nekrashevich and Anton Shevtsov and Alexander Golubev}, year={2026}, eprint={2602.23866}, archivePrefix={arXiv}, primaryClass={cs.SE}, url={https://arxiv.org/abs/2602.23866}, }