File size: 1,673 Bytes
c7618b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
annotations_creators:
- no-creator
language_creators:
- found
language:
- en
license: cc-by-4.0
multilingual: false
pretty_name: Python DPO Sample
size_categories:
- n<10
source_datasets:
- original
task_categories:
- text-generation
dataset_info:
  config_name: default
  features:
  - name: prompt
    dtype: string
  - name: chosen
    dtype: string
  - name: rejected
    dtype: string
  - name: explanation
    dtype: string
  - name: metadata
    dtype: dict
---

# Python Bug DPO Pairs - Sample

5 expert-curated DPO (Direct Preference Optimization) pairs for evaluating Python coding model fine-tuning data.

## What's Inside

Each pair includes:
- **prompt**: Bug scenario description
- **chosen**: Correct solution (production-ready code)
- **rejected**: Subtle buggy solution (passes casual review)
- **explanation**: Technical analysis with deployment context
- **metadata**: Quality metrics and prevention tools

## Sample Pairs

| pair_id | category | difficulty | framework |
|---------|----------|------------|-----------|
| 1 | mutable_defaults | beginner | Celery |
| 19 | N+1 query | intermediate | FastAPI |
| 45 | race_conditions | intermediate | asyncio |
| 51 | sqlalchemy_sessions | intermediate | SQLAlchemy |
| 6 | memory_leaks | advanced | FastAPI |

## Loading

```python
from datasets import load_dataset

dataset = load_dataset("blackhole-datasets/python-dpo-preview")
pair = dataset["train"][0]
print(pair["explanation"][:500])
```

## Quality Verification

- ✅ Expert validated: Victor Bendas (Senior Python Engineer)
- ✅ AI pattern detection: 0 violations
- ✅ All code syntax validated
- ✅ All tests pass

## License

CC-BY-4.0