Datasets:
Upload Stack v2 sparse Python classes 10k snapshot
Browse files- .gitattributes +2 -0
- README.md +50 -0
- all.jsonl +3 -0
- metadata.json +118 -0
- test.jsonl +0 -0
- train.jsonl +3 -0
- val.jsonl +0 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
all.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
train.jsonl filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
- code-generation
|
| 6 |
+
language:
|
| 7 |
+
- code
|
| 8 |
+
- en
|
| 9 |
+
pretty_name: Stack v2 Sparse Python Classes 10k
|
| 10 |
+
size_categories:
|
| 11 |
+
- 10K<n<100K
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Stack v2 Sparse Python Classes 10k
|
| 15 |
+
|
| 16 |
+
This is a 10,000-sample snapshot for Diffusion + Autoregressive hybrid code generation experiments.
|
| 17 |
+
|
| 18 |
+
## Source
|
| 19 |
+
|
| 20 |
+
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.
|
| 21 |
+
|
| 22 |
+
## Splits
|
| 23 |
+
|
| 24 |
+
- `train.jsonl`: 9,000
|
| 25 |
+
- `val.jsonl`: 500
|
| 26 |
+
- `test.jsonl`: 500
|
| 27 |
+
- `all.jsonl`: 10,000
|
| 28 |
+
|
| 29 |
+
## Record Format
|
| 30 |
+
|
| 31 |
+
Each JSONL row is one Python class sample. Important fields include:
|
| 32 |
+
|
| 33 |
+
- `prompt`: natural-language class implementation prompt
|
| 34 |
+
- `skeleton`: class/method signatures and docstrings with `<|body_i|>` slots
|
| 35 |
+
- `bodies`: list of method bodies without docstrings
|
| 36 |
+
- `bodies_text`: body slots wrapped by `<|body_start_i|>` and `<|end_body_i|>`
|
| 37 |
+
- `full_text`: skeleton plus body slots
|
| 38 |
+
- `solution`: reconstructed class code
|
| 39 |
+
- `source_repo`, `source_path`, `revision_id`, `blob_id`, `detected_licenses`: source metadata
|
| 40 |
+
|
| 41 |
+
## Filters
|
| 42 |
+
|
| 43 |
+
- 2 to 6 methods per class
|
| 44 |
+
- every method has a non-empty docstring
|
| 45 |
+
- every method body has 3 to 30 non-empty lines
|
| 46 |
+
- reconstructed class parses as Python AST
|
| 47 |
+
- tests/docs/examples/vendor/generated files are excluded by metadata/path filters
|
| 48 |
+
- simple ClassEval/HumanEval contamination filters are applied
|
| 49 |
+
|
| 50 |
+
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.
|
all.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7114396909c5ddedf3551f1cb74de30d55dd07913b4c469eec94958bbe494a0e
|
| 3 |
+
size 123195369
|
metadata.json
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "stack_v2_sparse_classes_10k",
|
| 3 |
+
"source_dataset_dir": "data/stack_v2_sparse_classes_30k",
|
| 4 |
+
"source_dataset": "bigcode/the-stack-v2-dedup",
|
| 5 |
+
"source_data_files": "data/Python/*.parquet",
|
| 6 |
+
"snapshot_size": 10000,
|
| 7 |
+
"snapshot_seed": 42,
|
| 8 |
+
"bad_json_lines_skipped": 0,
|
| 9 |
+
"splits": {
|
| 10 |
+
"train": 9000,
|
| 11 |
+
"val": 500,
|
| 12 |
+
"test": 500
|
| 13 |
+
},
|
| 14 |
+
"format": "class-level Python code generation with prompt, skeleton, method bodies, and reconstructed solution",
|
| 15 |
+
"filters": {
|
| 16 |
+
"min_methods": 2,
|
| 17 |
+
"max_methods": 6,
|
| 18 |
+
"require_method_docstrings": true,
|
| 19 |
+
"min_body_lines": 3,
|
| 20 |
+
"max_body_lines": 30,
|
| 21 |
+
"max_total_tokens": 1500,
|
| 22 |
+
"min_length_bytes": 500,
|
| 23 |
+
"max_length_bytes": 50000,
|
| 24 |
+
"skip_tests_docs_examples_init": true,
|
| 25 |
+
"pyflakes_hard_filter": false
|
| 26 |
+
},
|
| 27 |
+
"method_count_distribution": {
|
| 28 |
+
"2": 6117,
|
| 29 |
+
"3": 2225,
|
| 30 |
+
"4": 929,
|
| 31 |
+
"5": 460,
|
| 32 |
+
"6": 269
|
| 33 |
+
},
|
| 34 |
+
"top_repos": [
|
| 35 |
+
[
|
| 36 |
+
"cohesity/management-sdk-python",
|
| 37 |
+
190
|
| 38 |
+
],
|
| 39 |
+
[
|
| 40 |
+
"microsoftgraph/msgraph-sdk-python",
|
| 41 |
+
161
|
| 42 |
+
],
|
| 43 |
+
[
|
| 44 |
+
"home-assistant/core",
|
| 45 |
+
100
|
| 46 |
+
],
|
| 47 |
+
[
|
| 48 |
+
"jansel/pytorch-jit-paritybench",
|
| 49 |
+
80
|
| 50 |
+
],
|
| 51 |
+
[
|
| 52 |
+
"sungminoh/algorithms",
|
| 53 |
+
54
|
| 54 |
+
],
|
| 55 |
+
[
|
| 56 |
+
"953250587/leetcode-python",
|
| 57 |
+
47
|
| 58 |
+
],
|
| 59 |
+
[
|
| 60 |
+
"bssrdf/pyleet",
|
| 61 |
+
44
|
| 62 |
+
],
|
| 63 |
+
[
|
| 64 |
+
"Shiv2157k/leet_code",
|
| 65 |
+
37
|
| 66 |
+
],
|
| 67 |
+
[
|
| 68 |
+
"Jimmy-INL/google-research",
|
| 69 |
+
37
|
| 70 |
+
],
|
| 71 |
+
[
|
| 72 |
+
"inventree/InvenTree",
|
| 73 |
+
28
|
| 74 |
+
],
|
| 75 |
+
[
|
| 76 |
+
"metoppv/improver",
|
| 77 |
+
28
|
| 78 |
+
],
|
| 79 |
+
[
|
| 80 |
+
"JavaRod/SP_Python220B_2019",
|
| 81 |
+
28
|
| 82 |
+
],
|
| 83 |
+
[
|
| 84 |
+
"bingli8802/leetcode",
|
| 85 |
+
28
|
| 86 |
+
],
|
| 87 |
+
[
|
| 88 |
+
"musabahmed/baba",
|
| 89 |
+
27
|
| 90 |
+
],
|
| 91 |
+
[
|
| 92 |
+
"mindspore-ai/models",
|
| 93 |
+
27
|
| 94 |
+
],
|
| 95 |
+
[
|
| 96 |
+
"vincent-lg/tsunami",
|
| 97 |
+
27
|
| 98 |
+
],
|
| 99 |
+
[
|
| 100 |
+
"RaulCatalano/meraki-python-sdk",
|
| 101 |
+
26
|
| 102 |
+
],
|
| 103 |
+
[
|
| 104 |
+
"yiming1012/MyLeetCode",
|
| 105 |
+
26
|
| 106 |
+
],
|
| 107 |
+
[
|
| 108 |
+
"demisto/content",
|
| 109 |
+
26
|
| 110 |
+
],
|
| 111 |
+
[
|
| 112 |
+
"metux/chromium-suckless",
|
| 113 |
+
26
|
| 114 |
+
]
|
| 115 |
+
],
|
| 116 |
+
"avg_body_lines": 9.226233090922793,
|
| 117 |
+
"task": "Given class/method signatures and docstrings, generate class skeleton and method bodies for Diffusion + AR hybrid code generation experiments."
|
| 118 |
+
}
|
test.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
train.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:74c7adbdadacf6d2813d81163311551b7982486b956ce61e45ef62b09cf17c4a
|
| 3 |
+
size 110831122
|
val.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|