Update dataset card
Browse files
README.md
CHANGED
|
@@ -1,100 +1,101 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
language:
|
| 4 |
-
- en
|
| 5 |
size_categories:
|
| 6 |
-
-
|
| 7 |
task_categories:
|
| 8 |
-
- text-generation
|
| 9 |
source_datasets:
|
| 10 |
-
- nebius/SWE-rebench-V2
|
| 11 |
-
pretty_name: SWE-rebench V2
|
| 12 |
tags:
|
| 13 |
-
- code
|
| 14 |
-
- execution-traces
|
| 15 |
-
- swe-rebench
|
| 16 |
-
- marin
|
| 17 |
---
|
| 18 |
|
| 19 |
# SWE-rebench V2 — CodeWorldModeling Traces
|
| 20 |
|
| 21 |
-
This dataset
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
| 32 |
-
> [`nebius/SWE-rebench-V2`](https://huggingface.co/datasets/nebius/SWE-rebench-V2).
|
| 33 |
-
> See [License](#license) for licensing details.
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
Each
|
| 38 |
-
dataset traces those tests in two ways.
|
| 39 |
|
| 40 |
-
|
| 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 |
-
|
| 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 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
-
the test, then the trace material associated with that test.
|
| 56 |
|
| 57 |
-
|
|
|
|
| 58 |
|
| 59 |
-
```
|
| 60 |
<test source>
|
| 61 |
|
| 62 |
# --- trace ---
|
| 63 |
<line-by-line execution trace>
|
| 64 |
```
|
| 65 |
|
| 66 |
-
|
|
|
|
| 67 |
|
| 68 |
-
```
|
| 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 |
-
|
| 82 |
-
runtime state
|
| 83 |
-
branch outcomes, assignments, return values, and exceptions.
|
| 84 |
|
| 85 |
-
|
|
| 86 |
-
| ---
|
| 87 |
-
| `# === file::function (line N) ===`
|
| 88 |
-
| `# ENTER: arg=value, ...`
|
| 89 |
-
| `# branch=if:True` / `
|
| 90 |
-
| `name = expr # name=value`
|
| 91 |
-
| `# RETURN from function: value`
|
| 92 |
-
| `# EXCEPTION in function: ...`
|
| 93 |
|
| 94 |
-
## Example
|
| 95 |
|
| 96 |
-
|
| 97 |
-
Consider this simple source file:
|
| 98 |
|
| 99 |
```python
|
| 100 |
def clamp(value, low, high):
|
|
@@ -105,10 +106,9 @@ def clamp(value, low, high):
|
|
| 105 |
return value
|
| 106 |
```
|
| 107 |
|
| 108 |
-
|
| 109 |
-
trace:
|
| 110 |
|
| 111 |
-
```
|
| 112 |
def test_clamp_within_range():
|
| 113 |
assert clamp(5, 0, 10) == 5
|
| 114 |
|
|
@@ -126,18 +126,13 @@ def clamp(value, low, high):
|
|
| 126 |
# RETURN from clamp: 5
|
| 127 |
```
|
| 128 |
|
| 129 |
-
|
| 130 |
-
branch was taken, and that the function returned `5`.
|
| 131 |
-
|
| 132 |
-
## Example: bug and fix behavior
|
| 133 |
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
behavior, the patch corrects the implementation, and the post-patch trace shows
|
| 138 |
-
the corrected return value.
|
| 139 |
|
| 140 |
-
```
|
| 141 |
def test_clamp_above_range():
|
| 142 |
assert clamp(99, 0, 10) == 10
|
| 143 |
|
|
@@ -151,7 +146,7 @@ def clamp(value, low, high):
|
|
| 151 |
# ENTER: value=99, low=0, high=10
|
| 152 |
if value < low: # branch=if:False
|
| 153 |
if value > high: # branch=if:True
|
| 154 |
-
|
| 155 |
# RETURN from clamp: 0
|
| 156 |
# EXCEPTION in test_clamp_above_range: AssertionError: assert 0 == 10
|
| 157 |
|
|
@@ -175,31 +170,18 @@ def clamp(value, low, high):
|
|
| 175 |
# ENTER: value=99, low=0, high=10
|
| 176 |
if value < low: # branch=if:False
|
| 177 |
if value > high: # branch=if:True
|
| 178 |
-
|
| 179 |
# RETURN from clamp: 10
|
| 180 |
```
|
| 181 |
|
| 182 |
-
##
|
| 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 |
-
|
| 196 |
-
license
|
| 197 |
-
multi-GB trace shards do not
|
|
|
|
| 198 |
|
| 199 |
-
|
| 200 |
-
rows.
|
| 201 |
-
|
| 202 |
-
### Using `datasets`
|
| 203 |
|
| 204 |
```python
|
| 205 |
from datasets import load_dataset
|
|
@@ -213,13 +195,12 @@ license_by_instance = dict(zip(licenses["instance_id"], licenses["license"]))
|
|
| 213 |
traces = traces.map(lambda row: {"license": license_by_instance[row["instance_id"]]})
|
| 214 |
```
|
| 215 |
|
| 216 |
-
|
| 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,11 +208,9 @@ traces = traces.merge(licenses, on="instance_id", how="left")
|
|
| 227 |
|
| 228 |
## Provenance
|
| 229 |
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
[
|
| 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,34 +221,36 @@ This dataset is derived from SWE-rebench V2 and inherits its license terms:
|
|
| 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 |
-
|
| 246 |
-
`metadata/licenses.parquet`
|
|
|
|
|
|
|
| 247 |
|
| 248 |
## Citation
|
| 249 |
|
| 250 |
-
Please cite both this dataset and the source dataset
|
| 251 |
|
| 252 |
-
|
| 253 |
|
| 254 |
```bibtex
|
| 255 |
@misc{marincommunity2026swerebenchcodeworldmodeling,
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
}
|
| 261 |
```
|
| 262 |
|
| 263 |
-
|
| 264 |
|
| 265 |
```bibtex
|
| 266 |
@misc{badertdinov2026swerebenchv2languageagnosticswe,
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
}
|
| 275 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
language:
|
| 4 |
+
- en
|
| 5 |
size_categories:
|
| 6 |
+
- n>1T
|
| 7 |
task_categories:
|
| 8 |
+
- text-generation
|
| 9 |
source_datasets:
|
| 10 |
+
- nebius/SWE-rebench-V2
|
| 11 |
+
pretty_name: SWE-rebench V2 CodeWorldModeling Traces
|
| 12 |
tags:
|
| 13 |
+
- code
|
| 14 |
+
- execution-traces
|
| 15 |
+
- swe-rebench
|
| 16 |
+
- marin
|
| 17 |
---
|
| 18 |
|
| 19 |
# SWE-rebench V2 — CodeWorldModeling Traces
|
| 20 |
|
| 21 |
+
> **This is a derived dataset.** Every record is produced from an instance of
|
| 22 |
+
> [`nebius/SWE-rebench-V2`](https://huggingface.co/datasets/nebius/SWE-rebench-V2).
|
| 23 |
+
> It is **governed by the SWE-rebench V2 license** — see [License](#license)
|
| 24 |
+
> below — including the requirement to respect each source repository's own
|
| 25 |
+
> license.
|
| 26 |
|
| 27 |
+
Line-by-line Python execution traces for the test suites of SWE-rebench V2
|
| 28 |
+
instances, captured by running each instance's tests under a tracer inside
|
| 29 |
+
Nebius ConTree sandboxes.
|
| 30 |
|
| 31 |
+
Each instance comes with a fix patch. The pipeline traces two kinds of tests:
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
- **Fix-verifying tests** (`affected=True`) — tests that fail before the fix
|
| 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 row is one ``(instance_id, test_id)`` trace.
|
|
|
|
| 41 |
|
| 42 |
+
## Schema
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
Trace shards under `data/`:
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
| column | type | notes |
|
| 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 |
+
Sentinel rows from instances that failed before any trace was captured are
|
| 54 |
+
excluded.
|
| 55 |
|
| 56 |
+
## Reading a trace
|
|
|
|
| 57 |
|
| 58 |
+
The `text` of a regression-suite row (`affected=False`) is the test source
|
| 59 |
+
followed by a single trace:
|
| 60 |
|
| 61 |
+
```
|
| 62 |
<test source>
|
| 63 |
|
| 64 |
# --- trace ---
|
| 65 |
<line-by-line execution trace>
|
| 66 |
```
|
| 67 |
|
| 68 |
+
A fix-verifying row (`affected=True`) carries the test source, the trace from
|
| 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 `git diff` form>
|
| 79 |
|
| 80 |
# --- post-patch trace ---
|
| 81 |
<line-by-line execution trace, after the fix>
|
| 82 |
```
|
| 83 |
|
| 84 |
+
A trace replays execution one source line at a time. Inline `#` comments record
|
| 85 |
+
runtime state:
|
|
|
|
| 86 |
|
| 87 |
+
| comment | meaning |
|
| 88 |
+
| --- | --- |
|
| 89 |
+
| `# === file::function (line N) ===` | execution entered this function frame |
|
| 90 |
+
| `# ENTER: arg=value, ...` | argument values at the call |
|
| 91 |
+
| `# branch=if:True` / `:False` | which way a conditional went |
|
| 92 |
+
| `name = expr # name=value` | value bound by an assignment (right-margin) |
|
| 93 |
+
| `# RETURN from function: value` | the frame's return value |
|
| 94 |
+
| `# EXCEPTION in function: ...` | an exception raised in the frame |
|
| 95 |
|
| 96 |
+
### Example — a regression-suite trace (`affected=False`)
|
| 97 |
|
| 98 |
+
Source file `mathx.py`:
|
|
|
|
| 99 |
|
| 100 |
```python
|
| 101 |
def clamp(value, low, high):
|
|
|
|
| 106 |
return value
|
| 107 |
```
|
| 108 |
|
| 109 |
+
Test `test_clamp_within_range` and its trace:
|
|
|
|
| 110 |
|
| 111 |
+
```
|
| 112 |
def test_clamp_within_range():
|
| 113 |
assert clamp(5, 0, 10) == 5
|
| 114 |
|
|
|
|
| 126 |
# RETURN from clamp: 5
|
| 127 |
```
|
| 128 |
|
| 129 |
+
### Example — a fix-verifying trace (`affected=True`)
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
+
The buggy `clamp` returns `low` instead of `high` when `value` is above the
|
| 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 |
|
|
|
|
| 146 |
# ENTER: value=99, low=0, high=10
|
| 147 |
if value < low: # branch=if:False
|
| 148 |
if value > high: # branch=if:True
|
| 149 |
+
return low
|
| 150 |
# RETURN from clamp: 0
|
| 151 |
# EXCEPTION in test_clamp_above_range: AssertionError: assert 0 == 10
|
| 152 |
|
|
|
|
| 170 |
# ENTER: value=99, low=0, high=10
|
| 171 |
if value < low: # branch=if:False
|
| 172 |
if value > high: # branch=if:True
|
| 173 |
+
return high
|
| 174 |
# RETURN from clamp: 10
|
| 175 |
```
|
| 176 |
|
| 177 |
+
## Joining the per-instance license
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
|
| 179 |
+
`metadata/licenses.parquet` is a companion file mapping `instance_id` ->
|
| 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 |
+
With `datasets`:
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
```python
|
| 187 |
from datasets import load_dataset
|
|
|
|
| 195 |
traces = traces.map(lambda row: {"license": license_by_instance[row["instance_id"]]})
|
| 196 |
```
|
| 197 |
|
| 198 |
+
With pandas:
|
| 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 |
|
| 209 |
## Provenance
|
| 210 |
|
| 211 |
+
- **Source dataset**: [`nebius/SWE-rebench-V2`](https://huggingface.co/datasets/nebius/SWE-rebench-V2)
|
| 212 |
+
- **Generator**: [`experiments/swe_rebench_trace/contree_pipeline.py`](https://github.com/marin-community/marin/blob/main/experiments/swe_rebench_trace/contree_pipeline.py)
|
| 213 |
+
in [marin-community/marin](https://github.com/marin-community/marin).
|
|
|
|
|
|
|
| 214 |
|
| 215 |
## License
|
| 216 |
|
|
|
|
| 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 |
+
The per-instance source-repository license is provided in the companion file
|
| 225 |
+
`metadata/licenses.parquet` (join on `instance_id`). When using or
|
| 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 derives from.
|
| 232 |
|
| 233 |
+
This dataset:
|
| 234 |
|
| 235 |
```bibtex
|
| 236 |
@misc{marincommunity2026swerebenchcodeworldmodeling,
|
| 237 |
+
title={SWE-rebench V2 CodeWorldModeling Traces},
|
| 238 |
+
author={Marin Community},
|
| 239 |
+
year={2026},
|
| 240 |
+
howpublished={\url{https://huggingface.co/datasets/marin-community/swe-rebench-v2-CodeWorldModeling}},
|
| 241 |
}
|
| 242 |
```
|
| 243 |
|
| 244 |
+
Source dataset:
|
| 245 |
|
| 246 |
```bibtex
|
| 247 |
@misc{badertdinov2026swerebenchv2languageagnosticswe,
|
| 248 |
+
title={SWE-rebench V2: Language-Agnostic SWE Task Collection at Scale},
|
| 249 |
+
author={Ibragim Badertdinov and Maksim Nekrashevich and Anton Shevtsov and Alexander Golubev},
|
| 250 |
+
year={2026},
|
| 251 |
+
eprint={2602.23866},
|
| 252 |
+
archivePrefix={arXiv},
|
| 253 |
+
primaryClass={cs.SE},
|
| 254 |
+
url={https://arxiv.org/abs/2602.23866},
|
| 255 |
}
|
| 256 |
+
```
|