Update README.md
Browse files
README.md
CHANGED
|
@@ -1,101 +1,100 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
language:
|
| 4 |
-
|
| 5 |
size_categories:
|
| 6 |
-
|
| 7 |
task_categories:
|
| 8 |
-
|
| 9 |
source_datasets:
|
| 10 |
-
|
| 11 |
-
pretty_name: SWE-rebench V2
|
| 12 |
tags:
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
---
|
| 18 |
|
| 19 |
# SWE-rebench V2 — CodeWorldModeling Traces
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
-
patch and pass after it. These are the tests that demonstrate the bug and its
|
| 35 |
-
fix. Such a row is traced *twice*: once before the patch (the failing run) and
|
| 36 |
-
once after (the passing run).
|
| 37 |
-
- **Regression-suite tests** (`affected=False`) — the rest of the repository's
|
| 38 |
-
existing test suite ("broad phase"), each traced once at the fixed revision.
|
| 39 |
|
| 40 |
-
Each
|
|
|
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
| `instance_id` | string | SWE-rebench-V2 row id |
|
| 49 |
-
| `test_id` | string | pytest node id |
|
| 50 |
-
| `affected` | bool | `True` = fix-verifying test (fails before the patch, passes after); `False` = regression-suite test traced once at the fixed revision |
|
| 51 |
-
| `text` | string | plain-text test source + line-by-line execution trace (see below) |
|
| 52 |
|
| 53 |
-
|
| 54 |
-
excluded.
|
| 55 |
|
| 56 |
-
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
-
followed by a single trace:
|
| 60 |
|
| 61 |
-
```
|
| 62 |
<test source>
|
| 63 |
|
| 64 |
# --- trace ---
|
| 65 |
<line-by-line execution trace>
|
| 66 |
```
|
| 67 |
|
| 68 |
-
|
| 69 |
-
*before* the fix, the fix patch itself, and the trace from *after* the fix:
|
| 70 |
|
| 71 |
-
```
|
| 72 |
<test source>
|
| 73 |
|
| 74 |
# --- pre-patch trace ---
|
| 75 |
<line-by-line execution trace, before the fix>
|
| 76 |
|
| 77 |
# --- patch ---
|
| 78 |
-
<the fix patch, in
|
| 79 |
|
| 80 |
# --- post-patch trace ---
|
| 81 |
<line-by-line execution trace, after the fix>
|
| 82 |
```
|
| 83 |
|
| 84 |
-
|
| 85 |
-
runtime state
|
|
|
|
| 86 |
|
| 87 |
-
|
|
| 88 |
-
| --- | --- |
|
| 89 |
-
| `# === file::function (line N) ===`
|
| 90 |
-
| `# ENTER: arg=value, ...`
|
| 91 |
-
| `# branch=if:True` / `:False` |
|
| 92 |
-
| `name = expr # name=value`
|
| 93 |
-
| `# RETURN from function: value`
|
| 94 |
-
| `# EXCEPTION in function: ...`
|
| 95 |
|
| 96 |
-
##
|
| 97 |
|
| 98 |
-
|
|
|
|
| 99 |
|
| 100 |
```python
|
| 101 |
def clamp(value, low, high):
|
|
@@ -106,9 +105,10 @@ def clamp(value, low, high):
|
|
| 106 |
return value
|
| 107 |
```
|
| 108 |
|
| 109 |
-
|
|
|
|
| 110 |
|
| 111 |
-
```
|
| 112 |
def test_clamp_within_range():
|
| 113 |
assert clamp(5, 0, 10) == 5
|
| 114 |
|
|
@@ -126,13 +126,18 @@ def clamp(value, low, high):
|
|
| 126 |
# RETURN from clamp: 5
|
| 127 |
```
|
| 128 |
|
| 129 |
-
|
|
|
|
| 130 |
|
| 131 |
-
|
| 132 |
-
range, so `test_clamp_above_range` fails. The fix patch corrects it. The
|
| 133 |
-
pre-patch trace shows the failure, the post-patch trace shows it passing:
|
| 134 |
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
def test_clamp_above_range():
|
| 137 |
assert clamp(99, 0, 10) == 10
|
| 138 |
|
|
@@ -174,14 +179,27 @@ def clamp(value, low, high):
|
|
| 174 |
# RETURN from clamp: 10
|
| 175 |
```
|
| 176 |
|
| 177 |
-
##
|
| 178 |
|
| 179 |
-
|
| 180 |
-
`license` (the source repository's license at the instance commit). It is kept
|
| 181 |
-
separate so the multi-GB trace shards do not carry a redundant per-row string.
|
| 182 |
-
Join it on `instance_id` to attach the license to any trace row.
|
| 183 |
|
| 184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
```python
|
| 187 |
from datasets import load_dataset
|
|
@@ -195,12 +213,13 @@ license_by_instance = dict(zip(licenses["instance_id"], licenses["license"]))
|
|
| 195 |
traces = traces.map(lambda row: {"license": license_by_instance[row["instance_id"]]})
|
| 196 |
```
|
| 197 |
|
| 198 |
-
|
| 199 |
|
| 200 |
```python
|
| 201 |
import pandas as pd
|
| 202 |
|
| 203 |
base = "hf://datasets/marin-community/swe-rebench-v2-CodeWorldModeling"
|
|
|
|
| 204 |
traces = pd.read_parquet(f"{base}/data")
|
| 205 |
licenses = pd.read_parquet(f"{base}/metadata/licenses.parquet")
|
| 206 |
traces = traces.merge(licenses, on="instance_id", how="left")
|
|
@@ -208,9 +227,11 @@ traces = traces.merge(licenses, on="instance_id", how="left")
|
|
| 208 |
|
| 209 |
## Provenance
|
| 210 |
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
|
|
|
|
|
|
| 214 |
|
| 215 |
## License
|
| 216 |
|
|
@@ -221,36 +242,34 @@ This dataset is derived from SWE-rebench V2 and inherits its license terms:
|
|
| 221 |
> particular instance is based. To facilitate this, the license of each
|
| 222 |
> repository at the time of the commit is provided for every instance.
|
| 223 |
|
| 224 |
-
|
| 225 |
-
`metadata/licenses.parquet`
|
| 226 |
-
redistributing these traces, honor the license of the originating repository
|
| 227 |
-
for each instance.
|
| 228 |
|
| 229 |
## Citation
|
| 230 |
|
| 231 |
-
Please cite both this dataset and the source dataset it
|
| 232 |
|
| 233 |
-
This dataset
|
| 234 |
|
| 235 |
```bibtex
|
| 236 |
@misc{marincommunity2026swerebenchcodeworldmodeling,
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
}
|
| 242 |
```
|
| 243 |
|
| 244 |
-
Source dataset
|
| 245 |
|
| 246 |
```bibtex
|
| 247 |
@misc{badertdinov2026swerebenchv2languageagnosticswe,
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
}
|
| 256 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
language:
|
| 4 |
+
- en
|
| 5 |
size_categories:
|
| 6 |
+
- 100B<n<1T
|
| 7 |
task_categories:
|
| 8 |
+
- text-generation
|
| 9 |
source_datasets:
|
| 10 |
+
- nebius/SWE-rebench-V2
|
| 11 |
+
pretty_name: SWE-rebench V2 Code World Modeling Traces
|
| 12 |
tags:
|
| 13 |
+
- code
|
| 14 |
+
- execution-traces
|
| 15 |
+
- swe-rebench
|
| 16 |
+
- marin
|
| 17 |
---
|
| 18 |
|
| 19 |
# SWE-rebench V2 — CodeWorldModeling Traces
|
| 20 |
|
| 21 |
+
This dataset turns SWE-rebench V2 software-engineering tasks into execution-trace
|
| 22 |
+
training examples. For each traced test, it records the test source together with
|
| 23 |
+
a line-by-line account of how the relevant Python code executed: which functions
|
| 24 |
+
were entered, what arguments were passed, which branches were taken, what values
|
| 25 |
+
were assigned, what returned, and where exceptions occurred.
|
| 26 |
|
| 27 |
+
The goal is to make the runtime behavior behind SWE-style bug fixes explicit.
|
| 28 |
+
Instead of seeing only a repository, a failing test, and a patch, a model or
|
| 29 |
+
researcher can inspect how the program behaved before and after the fix.
|
| 30 |
|
| 31 |
+
> **Derived dataset.** Every record is produced from an instance of
|
| 32 |
+
> [`nebius/SWE-rebench-V2`](https://huggingface.co/datasets/nebius/SWE-rebench-V2).
|
| 33 |
+
> See [License](#license) for licensing details.
|
| 34 |
|
| 35 |
+
## What is included
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
Each SWE-rebench V2 instance contains a bug-fixing patch and a set of tests. This
|
| 38 |
+
dataset traces those tests in two ways.
|
| 39 |
|
| 40 |
+
For tests that directly verify the fix, the dataset captures the story of the bug:
|
| 41 |
+
the test fails before the patch, the patch is applied, and the same test passes
|
| 42 |
+
afterward. These rows have `affected=True`. Their `text` field contains the test
|
| 43 |
+
source, the pre-patch trace, the patch itself, and the post-patch trace.
|
| 44 |
|
| 45 |
+
For the rest of the repository's test suite, the dataset captures normal
|
| 46 |
+
regression behavior at the fixed revision. These rows have `affected=False`.
|
| 47 |
+
Their `text` field contains the test source followed by a single execution trace.
|
| 48 |
|
| 49 |
+
Each row corresponds to one `(instance_id, test_id)` pair. Rows for instances
|
| 50 |
+
that failed before any trace could be captured are excluded.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
## How to read a row
|
|
|
|
| 53 |
|
| 54 |
+
The central field is `text`. It is designed to be readable as plain text: first
|
| 55 |
+
the test, then the trace material associated with that test.
|
| 56 |
|
| 57 |
+
For a regression-suite row (`affected=False`), the format is:
|
|
|
|
| 58 |
|
| 59 |
+
```text
|
| 60 |
<test source>
|
| 61 |
|
| 62 |
# --- trace ---
|
| 63 |
<line-by-line execution trace>
|
| 64 |
```
|
| 65 |
|
| 66 |
+
For a fix-verifying row (`affected=True`), the format is:
|
|
|
|
| 67 |
|
| 68 |
+
```text
|
| 69 |
<test source>
|
| 70 |
|
| 71 |
# --- pre-patch trace ---
|
| 72 |
<line-by-line execution trace, before the fix>
|
| 73 |
|
| 74 |
# --- patch ---
|
| 75 |
+
<the fix patch, in git diff form>
|
| 76 |
|
| 77 |
# --- post-patch trace ---
|
| 78 |
<line-by-line execution trace, after the fix>
|
| 79 |
```
|
| 80 |
|
| 81 |
+
Within a trace, comments on the right-hand side or on standalone lines describe
|
| 82 |
+
runtime state. For example, the trace records function entry, argument values,
|
| 83 |
+
branch outcomes, assignments, return values, and exceptions.
|
| 84 |
|
| 85 |
+
| Trace annotation | Meaning |
|
| 86 |
+
| ---------------------------------------- | ----------------------------------------------------------------- |
|
| 87 |
+
| `# === file::function (line N) ===` | Execution entered this function frame. |
|
| 88 |
+
| `# ENTER: arg=value, ...` | Function argument values at call time. |
|
| 89 |
+
| `# branch=if:True` / `# branch=if:False` | Which branch a conditional took. |
|
| 90 |
+
| `name = expr # name=value` | Value bound by an assignment, recorded as a right-margin comment. |
|
| 91 |
+
| `# RETURN from function: value` | Function return value. |
|
| 92 |
+
| `# EXCEPTION in function: ...` | Exception raised in the frame. |
|
| 93 |
|
| 94 |
+
## Example: regression behavior
|
| 95 |
|
| 96 |
+
A regression-suite trace shows how a passing test executes at the fixed revision.
|
| 97 |
+
Consider this simple source file:
|
| 98 |
|
| 99 |
```python
|
| 100 |
def clamp(value, low, high):
|
|
|
|
| 105 |
return value
|
| 106 |
```
|
| 107 |
|
| 108 |
+
A test that exercises the in-range case appears together with its execution
|
| 109 |
+
trace:
|
| 110 |
|
| 111 |
+
```text
|
| 112 |
def test_clamp_within_range():
|
| 113 |
assert clamp(5, 0, 10) == 5
|
| 114 |
|
|
|
|
| 126 |
# RETURN from clamp: 5
|
| 127 |
```
|
| 128 |
|
| 129 |
+
The trace shows that `clamp` was called with `value=5`, that neither conditional
|
| 130 |
+
branch was taken, and that the function returned `5`.
|
| 131 |
|
| 132 |
+
## Example: bug and fix behavior
|
|
|
|
|
|
|
| 133 |
|
| 134 |
+
A fix-verifying trace shows the same test before and after the patch. In the
|
| 135 |
+
example below, the buggy implementation returns `low` instead of `high` when the
|
| 136 |
+
input is above the allowed range. The pre-patch trace exposes the failing
|
| 137 |
+
behavior, the patch corrects the implementation, and the post-patch trace shows
|
| 138 |
+
the corrected return value.
|
| 139 |
+
|
| 140 |
+
```text
|
| 141 |
def test_clamp_above_range():
|
| 142 |
assert clamp(99, 0, 10) == 10
|
| 143 |
|
|
|
|
| 179 |
# RETURN from clamp: 10
|
| 180 |
```
|
| 181 |
|
| 182 |
+
## Dataset fields
|
| 183 |
|
| 184 |
+
Trace shards are stored under `data/`.
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
+
| Column | Type | Description |
|
| 187 |
+
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 188 |
+
| `instance_id` | string | SWE-rebench V2 row identifier. |
|
| 189 |
+
| `test_id` | string | Pytest node identifier. |
|
| 190 |
+
| `affected` | bool | Whether the test is fix-verifying. `True` means the test fails before the patch and passes after it. `False` means the test is part of the broader regression suite and is traced once at the fixed revision. |
|
| 191 |
+
| `text` | string | Test source and trace material in plain text. |
|
| 192 |
+
|
| 193 |
+
## Loading per-instance licenses
|
| 194 |
+
|
| 195 |
+
The companion file `metadata/licenses.parquet` maps each `instance_id` to the
|
| 196 |
+
license of the corresponding source repository. It is stored separately so the
|
| 197 |
+
multi-GB trace shards do not repeat a per-instance license string on every row.
|
| 198 |
+
|
| 199 |
+
Join this file on `instance_id` when you need license metadata attached to trace
|
| 200 |
+
rows.
|
| 201 |
+
|
| 202 |
+
### Using `datasets`
|
| 203 |
|
| 204 |
```python
|
| 205 |
from datasets import load_dataset
|
|
|
|
| 213 |
traces = traces.map(lambda row: {"license": license_by_instance[row["instance_id"]]})
|
| 214 |
```
|
| 215 |
|
| 216 |
+
### Using pandas
|
| 217 |
|
| 218 |
```python
|
| 219 |
import pandas as pd
|
| 220 |
|
| 221 |
base = "hf://datasets/marin-community/swe-rebench-v2-CodeWorldModeling"
|
| 222 |
+
|
| 223 |
traces = pd.read_parquet(f"{base}/data")
|
| 224 |
licenses = pd.read_parquet(f"{base}/metadata/licenses.parquet")
|
| 225 |
traces = traces.merge(licenses, on="instance_id", how="left")
|
|
|
|
| 227 |
|
| 228 |
## Provenance
|
| 229 |
|
| 230 |
+
The traces are derived from [`nebius/SWE-rebench-V2`](https://huggingface.co/datasets/nebius/SWE-rebench-V2).
|
| 231 |
+
They were generated with
|
| 232 |
+
[`experiments/swe_rebench_trace/contree_pipeline.py`](https://github.com/marin-community/marin/blob/main/experiments/swe_rebench_trace/contree_pipeline.py)
|
| 233 |
+
in [`marin-community/marin`](https://github.com/marin-community/marin), by
|
| 234 |
+
running tests under a tracer inside Nebius ConTree sandboxes.
|
| 235 |
|
| 236 |
## License
|
| 237 |
|
|
|
|
| 242 |
> particular instance is based. To facilitate this, the license of each
|
| 243 |
> repository at the time of the commit is provided for every instance.
|
| 244 |
|
| 245 |
+
Per-instance source-repository licenses are provided in
|
| 246 |
+
`metadata/licenses.parquet` and can be joined on `instance_id`.
|
|
|
|
|
|
|
| 247 |
|
| 248 |
## Citation
|
| 249 |
|
| 250 |
+
Please cite both this dataset and the source dataset from which it is derived.
|
| 251 |
|
| 252 |
+
### This dataset
|
| 253 |
|
| 254 |
```bibtex
|
| 255 |
@misc{marincommunity2026swerebenchcodeworldmodeling,
|
| 256 |
+
title = {SWE-rebench V2 CodeWorldModeling Traces},
|
| 257 |
+
author = {Marin Community},
|
| 258 |
+
year = {2026},
|
| 259 |
+
howpublished = {\url{https://huggingface.co/datasets/marin-community/swe-rebench-v2-CodeWorldModeling}},
|
| 260 |
}
|
| 261 |
```
|
| 262 |
|
| 263 |
+
### Source dataset
|
| 264 |
|
| 265 |
```bibtex
|
| 266 |
@misc{badertdinov2026swerebenchv2languageagnosticswe,
|
| 267 |
+
title = {SWE-rebench V2: Language-Agnostic SWE Task Collection at Scale},
|
| 268 |
+
author = {Ibragim Badertdinov and Maksim Nekrashevich and Anton Shevtsov and Alexander Golubev},
|
| 269 |
+
year = {2026},
|
| 270 |
+
eprint = {2602.23866},
|
| 271 |
+
archivePrefix = {arXiv},
|
| 272 |
+
primaryClass = {cs.SE},
|
| 273 |
+
url = {https://arxiv.org/abs/2602.23866},
|
| 274 |
}
|
| 275 |
+
```
|