# BugsInPy v2
## Dataset stats
- **489 v1 tasks → 65 kept; 424 newly archived.** All 65 retain their v1 repairs; v2 changes no task instructions, environments, tests or reference solutions.
- **501 native bugs: 65 kept, 435 archived and 1 not converted.** Archives include the 11 earlier v1 exclusions.
- **Images:** the original benchmark supplied none; v1 introduced 11 shared images. The 65 kept tasks reuse **4** of those [cached images](https://huggingface.co/datasets/FWeindel/validated-tasks/tree/main/bugsinpy_v1/cached_images). The Parquet pins their immutable revisions and checksums; no image copies are needed in v2.
## Dataset characteristics
Real Python projects at buggy commits, with upstream regression tests and reference fixes.
Domains
Software Engineering; Debugging; Python repositories.
Capabilities
Repository exploration, error diagnosis, code repair and regression testing.
**Likely transfer targets:** repository debugging and SWE-bench-style tasks.
## Pass@16 filtering
Keep a task if either model solved it at least once. Both models completed 16 attempts on every v1 task. Terminal errors count as unsuccessful attempts; unsolved tasks are not necessarily defective.
| Model | Tasks evaluated | Attempts | Tasks solved at least once |
| --- | ---: | ---: | ---: |
| Qwen3-30B Instruct | 489 | 7,824 | 56 |
| Qwen3-30B Thinking | 489 | 7,824 | 47 |
| Either model | 489 | 15,648 | **65** |
Successful-attempt distribution **among the 65 kept tasks**. Each model column totals 65; rows with zero tasks for both models are omitted. A task with 0/16 for one model was solved by the other.
| Successful attempts | Instruct tasks | Thinking tasks |
| --- | ---: | ---: |
| 0/16 | 9 | 18 |
| 1/16 | 16 | 17 |
| 2/16 | 8 | 7 |
| 3/16 | 7 | 4 |
| 4/16 | 3 | 4 |
| 5/16 | 6 | 3 |
| 6/16 | 5 | 1 |
| 7/16 | 1 | 5 |
| 9/16 | 2 | 2 |
| 10/16 | 1 | 2 |
| 11/16 | 3 | 1 |
| 12/16 | 2 | 0 |
| 13/16 | 1 | 0 |
| 14/16 | 0 | 1 |
| 15/16 | 1 | 0 |
The kept tasks inherit v1's rule-based repairs, build checks, reference reward 1 and no-op reward 0. [V1 repair details](https://huggingface.co/datasets/FWeindel/validated-tasks/blob/main/bugsinpy_v1/README.md) · [Teacher results](https://huggingface.co/datasets/FWeindel/validated-tasks/discussions/7).
## Select tasks by successful-attempt count
`tasks.parquet` includes `instruct_successes`, `thinking_successes` and `attempts_per_model` (16). Counts are also available in [selection.json](metadata/selection.json). Excluded payloads remain in the pinned v1 source recorded in `selection.json`; no duplicate archive Parquet is uploaded.
```python
import pyarrow.parquet as pq
# Exactly 1 successful attempt out of 16 for Instruct:
filters = [("instruct_successes", "=", 1)]
# Alternatively, at least 3 successes for either model:
# filters = [[("instruct_successes", ">=", 3)],
# [("thinking_successes", ">=", 3)]]
subset = pq.read_table("tasks.parquet", filters=filters)
pq.write_table(subset, "selected.parquet")
```
`patch.py` reproduces the release from the pinned v1 Parquets and recorded counts.
## Runtime and validation time
- **Versions:** Apptainer **1.5.4**, Python **3.12.14**, Harbor **0.8.1**.
- **Implementation:** [Marin Harbor `7faf878c14b6`](https://github.com/marin-community/harbor/tree/7faf878c14b6d72737579ec936ebf5f74ba3194d) + [our runtime patches](https://github.com/MLI-lab/OT-next-data/tree/main/harbor_patches).
| Teacher | Mean time per attempt | Median time per attempt | Attempts measured |
| --- | ---: | ---: | ---: |
| Instruct | 819.81 s | 591.60 s | 7,824 |
| Thinking | 1098.50 s | 750.80 s | 7,824 |
Timings cover recorded trials across all 489 evaluated tasks, including unsuccessful attempts.
## Traces
[Trace Parquets](traces) contain **15,648 attempts**, including successful and failed attempts from every evaluated task, kept or excluded. Zstandard-compressed, one row per attempt; **0** rows have no saved conversation and are marked `trajectory_found=false`.
Columns include `task_id`, `model`, `attempt_id`, `reward`, `verifier_reward`, `retained_v2`, `trajectory_found`, and the full `trajectory` and `result` JSON. `reward` follows the published evaluation policy; `verifier_reward` preserves the raw verifier score. The manifest pins the original trace source.
```python
import json
import pyarrow.dataset as ds
traces = ds.dataset("traces", format="parquet", exclude_invalid_files=True)
failed = traces.to_table(filter=(ds.field("reward") == 0) & ds.field("trajectory_found"))
conversation = json.loads(failed["trajectory"][0].as_py())
```