| --- |
| license: other |
| task_categories: |
| - text-generation |
| - code-generation |
| language: |
| - code |
| - en |
| pretty_name: Stack v2 Sparse Python Classes 10k |
| size_categories: |
| - 10K<n<100K |
| --- |
| |
| # Stack v2 Sparse Python Classes 10k |
|
|
| This is a 10,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`: 9,000 |
| - `val.jsonl`: 500 |
| - `test.jsonl`: 500 |
| - `all.jsonl`: 10,000 |
|
|
| ## Record Format |
|
|
| Each JSONL row is one Python class sample. Important fields include: |
|
|
| - `prompt`: natural-language class implementation prompt |
| - `skeleton`: class/method signatures and docstrings with `<|body_i|>` slots |
| - `bodies`: list of method bodies without docstrings |
| - `bodies_text`: body slots wrapped by `<|body_start_i|>` and `<|end_body_i|>` |
| - `full_text`: skeleton plus body slots |
| - `solution`: reconstructed class code |
| - `source_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. |
|
|