python-dpo-preview / README.md
VBendas's picture
Upload 2 files
c7618b6 verified
|
Raw History Blame Contribute Delete
1.67 kB
---
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