Datasets:
license: other
task_categories:
- text-generation
language:
- code
- en
pretty_name: Stack v2 Sparse Python Classes 75kplus
size_categories:
- 10K<n<100K
Stack v2 Sparse Python Classes 75kplus
This is a frozen snapshot with 75829 samples for Diffusion + Autoregressive hybrid code generation experiments.
Splits
train.jsonl: 74829val.jsonl: 500test.jsonl: 500all.jsonl: 75829
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.
This snapshot freezes the first 75829 JSONL rows from the live local dataset at packaging time, then shuffles with seed 42 before splitting.
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.