Dataset / README.md
dsfasdfaserwer's picture
Add Dataset #2: Magicoder-OSS-Instruct-75K python subset (+673 records)
159bae2 verified
|
Raw History Blame Contribute Delete
6.5 kB
---
license: apache-2.0
task_categories:
- text-generation
language:
- en
- code
tags:
- code
- python
- verified
- execution-tested
- training
pretty_name: Curated Execution-Verified Python Training Data (16k context)
---
# Curated Execution-Verified Python Programming + Reasoning Training Data
A small, extremely high-quality **training** dataset of Python programming examples where **every record's code was executed and passed its tests in an isolated sandbox** during curation (and the source itself is an execution-filtered dataset).
Priority order used for curation: **quality > correctness > usefulness > diversity > quantity**. Benchmark/evaluation material is excluded by policy (screened against HumanEval, MBPP, BigCodeBench v0.1.4, and DS-1000 problem texts) to avoid benchmark false-positives.
## Contents
```
├── 16k_context/train.jsonl # 10,948 records, each ≤ 16,000 tokens (o200k_base); p50 ≈ 1,019
├── over_16k/train.jsonl # empty — no accepted record exceeded 16k tokens
├── metadata/ # access check, dataset inventory, per-row processing log (88,945 rows), rejection audit trail (77,997), token manifest
└── reports/ # dataset quality report + verification report (methods, evidence, limitations)
```
## Record schema
```json
{
"instruction": "realistic human programming request (implementation-leak sentences removed where present)",
"reasoning": "concise, checkable solution rationale (extracted from the source response's explicit rationale prose, or a factual AST-based summary — never fabricated chain-of-thought)",
"code": "verified Python solution",
"tests": "tests executed against the solution (source-released tests, or asserts conservatively extracted from literal examples stated in the instruction)",
"documentation": "short explanation of behavior/edge cases",
"verification": { "executed": true, "tests_passed": true, "verification_method": "...", "edge_cases_checked": ["..."], "sandbox": "...", "source_dataset": "...", "source_url": "...", "source_row_id": 0, "source_split": "train", "seed_sha1": "...", "decontamination_screen": "..." },
"quality": { "source_quality": "...", "example_quality": ["tests:derived(3 asserts)", "..."], "human_verified": false, "execution_verified": true, "upstream_llm_generated": "StarCoder2-15B (self-generated)", "curator_note": "..." },
"provenance": { "original_dataset": "...", "original_url": "...", "original_id": 0, "original_split": "train", "seed_concepts": ["..."], "code_modified": false, "tests_added": true, "reasoning_generated_or_rewritten": "...", "original_instruction": null, "transformations": ["..."] }
}
```
Notes:
- `human_verified` is `false` everywhere — no human-reviewed variant of the source is publicly available; curation review was agent-performed (40-row stratified manual sample + automated gates). We do not fabricate verification metadata.
- `example_quality` tags disclose per-record caveats (`simple_task`, `instruction_retains_soft_impl_hint`, `instruction_had_impl_leak_removed`, test source and assert count).
## Loading
```python
from datasets import load_dataset
ds = load_dataset("json",
data_files="hf://datasets/dsfasdfaserwer/Dataset/16k_context/train.jsonl",
split="train")
```
## Provenance & attribution
All records derive from execution-verified, training-intent, permissively licensed sources. Per-record provenance (source dataset, row id, split, transformations) is embedded in every record.
**Source 1 — 10,275 records:** [bigcode/self-oss-instruct-sc2-exec-filter-50k](https://huggingface.co/datasets/bigcode/self-oss-instruct-sc2-exec-filter-50k) (**ODC-BY-1.0**, attribution required):
- Upstream pipeline **SelfCodeAlign** (Wei et al., NeurIPS 2024, [arXiv:2410.24198](https://arxiv.org/abs/2410.24198)); every released response passed an execution filter in a Docker sandbox.
- Seeds are real Python functions from The Stack via the **MultiPL-T** pipeline ([arXiv:2308.09895](https://arxiv.org/abs/2308.09895)).
- Generation model: StarCoder2-15B (self-generated; no proprietary distillation).
**Source 2 — 673 records:** [ise-uiuc/Magicoder-OSS-Instruct-75K](https://huggingface.co/datasets/ise-uiuc/Magicoder-OSS-Instruct-75K) (**MIT**), Python subset:
- Upstream pipeline **Magicoder / OSS-Instruct** (Wei et al., ICML 2024, [arXiv:2312.02120](https://arxiv.org/abs/2312.02120)); solutions generated by gpt-3.5-turbo-1106 from real OSS seeds with test generation + execution filtering documented in the paper; released file is the "decontaminated" variant. Released rows do not include test artifacts, so every Magicoder record here was accepted only after passing tests derived by us from the problem's own concrete examples (or the row's released/inline checks).
Curation performed for this repository (full details in `reports/`): 88,945 source rows inspected row-by-row across both datasets → static gates, AST analysis, conservative test derivation from stated examples, isolated-sandbox re-execution of every accepted record (twice, plus a determinism double-run for Magicoder), benchmark-decontamination screening vs HumanEval/MBPP/BigCodeBench/DS-1000 (−1,481 rows), deduplication (incl. cross-dataset), minor repairs (7 rows), instruction-leak removal, rationale cleanup, schema normalization, and programmatic token counting (tiktoken `o200k_base`). Final: **10,948 records, 100% execution-verified as shipped, 100% ≤16k tokens**.
Please attribute the upstream datasets and papers above when using this data. This repository's additions (curation, transformations, metadata) are provided under Apache-2.0.
## Intended use
Supervised fine-tuning / training of code models for Python programming and Python-reasoning tasks. **Not** an evaluation set. Do not use it to report benchmark numbers; it was explicitly screened to *exclude* benchmark tasks (HumanEval, MBPP, BigCodeBench, DS-1000), which makes it suitable for training without contaminating those evaluations, but it is not itself a benchmark.
## Limitations
See `reports/dataset_quality_report.md` §6 and `reports/verification_report.md` §7 — including: derived tests encode the instruction's own stated examples (1–5 asserts/record) rather than exhaustive suites; no per-row human review exists upstream; LiveCodeBench was not used as a screening corpus (different provenance class); lexical (not semantic) dedup.