WillHeld commited on
Commit
e7b4db7
·
verified ·
1 Parent(s): aec7ddd

Update dataset card

Browse files
Files changed (1) hide show
  1. README.md +38 -4
README.md CHANGED
@@ -34,13 +34,14 @@ one ``(instance_id, test_id)`` trace.
34
 
35
  ## Schema
36
 
 
 
37
  | column | type | notes |
38
  | --- | --- | --- |
39
  | `instance_id` | string | SWE-rebench-V2 row id |
40
  | `test_id` | string | pytest node id |
41
  | `affected` | bool | True = test touched by the PR patch; False = broad-phase test |
42
  | `text` | string | plain-text annotated source + execution trace |
43
- | `license` | string | license of the source repository, joined from SWE-rebench V2 by `instance_id` |
44
 
45
  `affected=True` rows render as ``<test source>`` / ``# --- pre-patch trace ---``
46
  / ``# --- patch ---`` / ``# --- post-patch trace ---``; `affected=False` rows
@@ -49,6 +50,38 @@ render as ``<test source>`` / ``# --- trace ---``.
49
  Sentinel rows from instances that failed before any trace was captured are
50
  excluded.
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  ## Provenance
53
 
54
  - **Source dataset**: [`nebius/SWE-rebench-V2`](https://huggingface.co/datasets/nebius/SWE-rebench-V2)
@@ -64,9 +97,10 @@ This dataset is derived from SWE-rebench V2 and inherits its license terms:
64
  > particular instance is based. To facilitate this, the license of each
65
  > repository at the time of the commit is provided for every instance.
66
 
67
- The per-instance source-repository license is included here directly as the
68
- `license` column. When using or redistributing these traces, honor the license
69
- of the originating repository for each instance.
 
70
 
71
  ## Citation
72
 
 
34
 
35
  ## Schema
36
 
37
+ Trace shards under `data/`:
38
+
39
  | column | type | notes |
40
  | --- | --- | --- |
41
  | `instance_id` | string | SWE-rebench-V2 row id |
42
  | `test_id` | string | pytest node id |
43
  | `affected` | bool | True = test touched by the PR patch; False = broad-phase test |
44
  | `text` | string | plain-text annotated source + execution trace |
 
45
 
46
  `affected=True` rows render as ``<test source>`` / ``# --- pre-patch trace ---``
47
  / ``# --- patch ---`` / ``# --- post-patch trace ---``; `affected=False` rows
 
50
  Sentinel rows from instances that failed before any trace was captured are
51
  excluded.
52
 
53
+ ## Joining the per-instance license
54
+
55
+ `metadata/licenses.parquet` is a companion file mapping `instance_id` ->
56
+ `license` (the source repository's license at the instance commit). It is kept
57
+ separate so the multi-GB trace shards do not carry a redundant per-row string.
58
+ Join it on `instance_id` to attach the license to any trace row.
59
+
60
+ With `datasets`:
61
+
62
+ ```python
63
+ from datasets import load_dataset
64
+
65
+ REPO = "marin-community/swe-rebench-v2-CodeWorldModeling"
66
+
67
+ traces = load_dataset(REPO, split="train")
68
+ licenses = load_dataset(REPO, data_files="metadata/licenses.parquet", split="train")
69
+
70
+ license_by_instance = dict(zip(licenses["instance_id"], licenses["license"]))
71
+ traces = traces.map(lambda row: {"license": license_by_instance[row["instance_id"]]})
72
+ ```
73
+
74
+ With pandas:
75
+
76
+ ```python
77
+ import pandas as pd
78
+
79
+ base = "hf://datasets/marin-community/swe-rebench-v2-CodeWorldModeling"
80
+ traces = pd.read_parquet(f"{base}/data")
81
+ licenses = pd.read_parquet(f"{base}/metadata/licenses.parquet")
82
+ traces = traces.merge(licenses, on="instance_id", how="left")
83
+ ```
84
+
85
  ## Provenance
86
 
87
  - **Source dataset**: [`nebius/SWE-rebench-V2`](https://huggingface.co/datasets/nebius/SWE-rebench-V2)
 
97
  > particular instance is based. To facilitate this, the license of each
98
  > repository at the time of the commit is provided for every instance.
99
 
100
+ The per-instance source-repository license is provided in the companion file
101
+ `metadata/licenses.parquet` (join on `instance_id`). When using or
102
+ redistributing these traces, honor the license of the originating repository
103
+ for each instance.
104
 
105
  ## Citation
106