guanning commited on
Commit
898cbea
·
verified ·
1 Parent(s): ad90398

Upload Stack v2 sparse Python classes 36k snapshot

Browse files
Files changed (7) hide show
  1. .gitattributes +4 -0
  2. README.md +51 -0
  3. all.jsonl +3 -0
  4. metadata.json +119 -0
  5. test.jsonl +3 -0
  6. train.jsonl +3 -0
  7. val.jsonl +3 -0
.gitattributes CHANGED
@@ -58,3 +58,7 @@ 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
+ test.jsonl filter=lfs diff=lfs merge=lfs -text
63
+ train.jsonl filter=lfs diff=lfs merge=lfs -text
64
+ val.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - code
7
+ - en
8
+ pretty_name: Stack v2 Sparse Python Classes 36k
9
+ size_categories:
10
+ - 10K<n<100K
11
+ ---
12
+
13
+ # Stack v2 Sparse Python Classes 36k
14
+
15
+ This is a 36,000-sample snapshot for Diffusion + Autoregressive hybrid code generation experiments.
16
+
17
+ ## Source
18
+
19
+ 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.
20
+
21
+ ## Splits
22
+
23
+ - `train.jsonl`: 26,000
24
+ - `val.jsonl`: 5,000
25
+ - `test.jsonl`: 5,000
26
+ - `all.jsonl`: 36,000
27
+
28
+ Note: the requested split `35k/5k/5k` sums to 45k, not 36k. This 36k snapshot keeps validation and test at 5k each and assigns the remaining 26k to train.
29
+
30
+ ## Record Format
31
+
32
+ Each JSONL row is one Python class sample. Important fields include:
33
+
34
+ - `prompt`: natural-language class implementation prompt
35
+ - `skeleton`: class/method signatures and docstrings with `<|body_i|>` slots
36
+ - `bodies`: list of method bodies without docstrings
37
+ - `bodies_text`: body slots wrapped by `<|body_start_i|>` and `<|end_body_i|>`
38
+ - `full_text`: skeleton plus body slots
39
+ - `solution`: reconstructed class code
40
+ - `source_repo`, `source_path`, `revision_id`, `blob_id`, `detected_licenses`: source metadata
41
+
42
+ ## Filters
43
+
44
+ - 2 to 6 methods per class
45
+ - every method has a non-empty docstring
46
+ - every method body has 3 to 30 non-empty lines
47
+ - reconstructed class parses as Python AST
48
+ - tests/docs/examples/vendor/generated files are excluded by metadata/path filters
49
+ - simple ClassEval/HumanEval contamination filters are applied
50
+
51
+ 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:06fc3f22d8fea4edfa0b2230f24110c75d1098184f7f603dbb52a9ffefcf72cc
3
+ size 444140865
metadata.json ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "stack_v2_sparse_classes_36k",
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": 36000,
7
+ "snapshot_seed": 42,
8
+ "bad_json_lines_skipped": 0,
9
+ "requested_split_note": "User requested a 36k dataset and also 35k/5k/5k splits, which sums to 45k. This 36k snapshot uses 26k/5k/5k to keep validation and test at 5k each.",
10
+ "splits": {
11
+ "train": 26000,
12
+ "val": 5000,
13
+ "test": 5000
14
+ },
15
+ "format": "class-level Python code generation with prompt, skeleton, method bodies, and reconstructed solution",
16
+ "filters": {
17
+ "min_methods": 2,
18
+ "max_methods": 6,
19
+ "require_method_docstrings": true,
20
+ "min_body_lines": 3,
21
+ "max_body_lines": 30,
22
+ "max_total_tokens": 1500,
23
+ "min_length_bytes": 500,
24
+ "max_length_bytes": 50000,
25
+ "skip_tests_docs_examples_init": true,
26
+ "pyflakes_hard_filter": false
27
+ },
28
+ "method_count_distribution": {
29
+ "2": 21570,
30
+ "3": 8008,
31
+ "4": 3586,
32
+ "5": 1856,
33
+ "6": 980
34
+ },
35
+ "top_repos": [
36
+ [
37
+ "cohesity/management-sdk-python",
38
+ 456
39
+ ],
40
+ [
41
+ "microsoftgraph/msgraph-sdk-python",
42
+ 401
43
+ ],
44
+ [
45
+ "home-assistant/core",
46
+ 291
47
+ ],
48
+ [
49
+ "jansel/pytorch-jit-paritybench",
50
+ 124
51
+ ],
52
+ [
53
+ "sungminoh/algorithms",
54
+ 124
55
+ ],
56
+ [
57
+ "953250587/leetcode-python",
58
+ 121
59
+ ],
60
+ [
61
+ "Shiv2157k/leet_code",
62
+ 118
63
+ ],
64
+ [
65
+ "Jimmy-INL/google-research",
66
+ 101
67
+ ],
68
+ [
69
+ "metoppv/improver",
70
+ 91
71
+ ],
72
+ [
73
+ "bssrdf/pyleet",
74
+ 90
75
+ ],
76
+ [
77
+ "dealflowteam/Idfy",
78
+ 78
79
+ ],
80
+ [
81
+ "vincent-lg/tsunami",
82
+ 76
83
+ ],
84
+ [
85
+ "oxhead/CodingYourWay",
86
+ 75
87
+ ],
88
+ [
89
+ "vsdrun/lc_public",
90
+ 75
91
+ ],
92
+ [
93
+ "JavaRod/SP_Python220B_2019",
94
+ 75
95
+ ],
96
+ [
97
+ "mindspore-ai/models",
98
+ 72
99
+ ],
100
+ [
101
+ "log2timeline/plaso",
102
+ 68
103
+ ],
104
+ [
105
+ "inventree/InvenTree",
106
+ 67
107
+ ],
108
+ [
109
+ "yiming1012/MyLeetCode",
110
+ 64
111
+ ],
112
+ [
113
+ "luque/better-ways-of-thinking-about-software",
114
+ 63
115
+ ]
116
+ ],
117
+ "avg_body_lines": 9.144970414201184,
118
+ "task": "Given class/method signatures and docstrings, generate class skeleton and method bodies for Diffusion + AR hybrid code generation experiments."
119
+ }
test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45bb3d8da6ea0f12a501f16316d4edfa56f3caaba3656c0e3b3a6844139806c1
3
+ size 61490756
train.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bfe4cc8c0d8451b01dbfdb0591e4bfad53f55e5b19f9784d0276a4847a09938d
3
+ size 320962541
val.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bff1b6b656ddd819af37d18d505169ee8432ab0aed08156963202af330156a6f
3
+ size 61687568