Datasets:
metadata
license: other
task_categories:
- text-generation
language:
- code
- en
pretty_name: Stack v2 Sparse Python Classes 36k
size_categories:
- 10K<n<100K
Stack v2 Sparse Python Classes 36k
This is a 36,000-sample snapshot for Diffusion + Autoregressive hybrid code generation experiments.
Source
The data is extracted from bigcode/the-stack-v2-dedup, Python subset. The extraction uses Stack v2 metadata as source of truth, groups candidates by repo_name + revision_id, fetches files with git partial fetch + sparse checkout, then applies AST-level class filters.
Splits
train.jsonl: 35,000val.jsonl: 500test.jsonl: 500all.jsonl: 36,000
Record Format
Each JSONL row is one Python class sample. Important fields include:
prompt: natural-language class implementation promptskeleton: class/method signatures and docstrings with<|body_i|>slotsbodies: list of method bodies without docstringsbodies_text: body slots wrapped by<|body_start_i|>and<|end_body_i|>full_text: skeleton plus body slotssolution: reconstructed class codesource_repo,source_path,revision_id,blob_id,detected_licenses: source metadata
Filters
- 2 to 6 methods per class
- every method has a non-empty docstring
- every method body has 3 to 30 non-empty lines
- reconstructed class parses as Python AST
- tests/docs/examples/vendor/generated files are excluded by metadata/path filters
- simple ClassEval/HumanEval contamination filters are applied
Strict pyflakes is not used as a hard filter because isolated extracted classes often depend on module-level imports, constants, parent classes, or helper functions.