Spaces:
Sleeping

PERDYPTO commited on
Commit
89c6f00
·
verified ·
1 Parent(s): a45ca15

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +80 -80
pipeline.py CHANGED
@@ -65,7 +65,7 @@
65
  # ============================================================
66
 
67
  import os
68
- import sysadf
69
  import json
70
  import time
71
  import gzip
@@ -126,7 +126,7 @@ PYTHON_VERSIONS = [
126
  AST_ACCEPT_MODE = "ANY"
127
 
128
  # Parallelism – reduced for HF Space (2 vCPU, 16 GB RAM)
129
- MAX_WORKERS = 2
130
 
131
  # ------------------------------------------------------------
132
  # SHARD SIZE — CHANGED per request.
@@ -184,84 +184,84 @@ DATASETS = [
184
  "path_fields": ["max_stars_repo_path", "path"],
185
  "license_fields": ["max_stars_repo_licenses", "license"],
186
  }
187
- # {
188
- # "name": "starcoderdata_python",
189
- # "dataset": "bigcode/starcoderdata",
190
- # "config": None,
191
- # "data_dir": "python",
192
- # "split": "train",
193
- # "kind": "generic",
194
- # "text_fields": ["content"],
195
- # "repo_fields": ["max_stars_repo_name", "repo_name"],
196
- # "path_fields": ["max_stars_repo_path", "path"],
197
- # "license_fields": ["max_stars_repo_licenses", "license"],
198
- # },
199
- # {
200
- # "name": "codeparrot_clean",
201
- # "dataset": "codeparrot/codeparrot-clean",
202
- # "config": None,
203
- # "split": "train",
204
- # "kind": "generic",
205
- # "text_fields": ["content"],
206
- # "repo_fields": ["repo_name", "repo"],
207
- # "path_fields": ["path", "filepath"],
208
- # "license_fields": ["license"],
209
- # },
210
- # {
211
- # "name": "pyhub",
212
- # "dataset": "FurkanNar/PyHub",
213
- # "config": None,
214
- # "split": "train",
215
- # "kind": "generic",
216
- # "text_fields": ["content", "text"],
217
- # "repo_fields": ["repo", "repo_name"],
218
- # "path_fields": ["filepath", "path"],
219
- # "license_fields": ["license", "license_type"],
220
- # },
221
- # {
222
- # "name": "redstone_code_python",
223
- # "dataset": "zjsd/RedStone-Code-python",
224
- # "config": None,
225
- # "split": "train",
226
- # "kind": "generic",
227
- # "text_fields": ["content"],
228
- # "repo_fields": [],
229
- # "path_fields": [],
230
- # "license_fields": [],
231
- # },
232
- # {
233
- # "name": "github_python",
234
- # "dataset": "jblitzar/github-python",
235
- # "config": None,
236
- # "split": "train",
237
- # "kind": "generic",
238
- # "text_fields": ["content"],
239
- # "repo_fields": ["repo"],
240
- # "path_fields": ["path"],
241
- # "license_fields": ["license"],
242
- # },
243
- # {
244
- # "name": "the_stack_v2_smol",
245
- # "dataset": "bigcode/the-stack-v2-train-smol-ids",
246
- # "config": None,
247
- # "split": "train",
248
- # "kind": "generic",
249
- # "text_fields": ["content"],
250
- # "repo_fields": ["repo_name"],
251
- # "path_fields": ["path"],
252
- # "license_fields": ["license"],
253
- # },
254
- # {
255
- # "name": "codeparrot_raw",
256
- # "dataset": "transformersbook/codeparrot",
257
- # "config": None,
258
- # "split": "train",
259
- # "kind": "generic",
260
- # "text_fields": ["content"],
261
- # "repo_fields": [],
262
- # "path_fields": [],
263
- # "license_fields": [],
264
- # }
265
  ]
266
 
267
  # ============================================================
 
65
  # ============================================================
66
 
67
  import os
68
+ import sys
69
  import json
70
  import time
71
  import gzip
 
126
  AST_ACCEPT_MODE = "ANY"
127
 
128
  # Parallelism – reduced for HF Space (2 vCPU, 16 GB RAM)
129
+ MAX_WORKERS = 4
130
 
131
  # ------------------------------------------------------------
132
  # SHARD SIZE — CHANGED per request.
 
184
  "path_fields": ["max_stars_repo_path", "path"],
185
  "license_fields": ["max_stars_repo_licenses", "license"],
186
  }
187
+ {
188
+ "name": "starcoderdata_python",
189
+ "dataset": "bigcode/starcoderdata",
190
+ "config": None,
191
+ "data_dir": "python",
192
+ "split": "train",
193
+ "kind": "generic",
194
+ "text_fields": ["content"],
195
+ "repo_fields": ["max_stars_repo_name", "repo_name"],
196
+ "path_fields": ["max_stars_repo_path", "path"],
197
+ "license_fields": ["max_stars_repo_licenses", "license"],
198
+ },
199
+ {
200
+ "name": "codeparrot_clean",
201
+ "dataset": "codeparrot/codeparrot-clean",
202
+ "config": None,
203
+ "split": "train",
204
+ "kind": "generic",
205
+ "text_fields": ["content"],
206
+ "repo_fields": ["repo_name", "repo"],
207
+ "path_fields": ["path", "filepath"],
208
+ "license_fields": ["license"],
209
+ },
210
+ {
211
+ "name": "pyhub",
212
+ "dataset": "FurkanNar/PyHub",
213
+ "config": None,
214
+ "split": "train",
215
+ "kind": "generic",
216
+ "text_fields": ["content", "text"],
217
+ "repo_fields": ["repo", "repo_name"],
218
+ "path_fields": ["filepath", "path"],
219
+ "license_fields": ["license", "license_type"],
220
+ },
221
+ {
222
+ "name": "redstone_code_python",
223
+ "dataset": "zjsd/RedStone-Code-python",
224
+ "config": None,
225
+ "split": "train",
226
+ "kind": "generic",
227
+ "text_fields": ["content"],
228
+ "repo_fields": [],
229
+ "path_fields": [],
230
+ "license_fields": [],
231
+ },
232
+ {
233
+ "name": "github_python",
234
+ "dataset": "jblitzar/github-python",
235
+ "config": None,
236
+ "split": "train",
237
+ "kind": "generic",
238
+ "text_fields": ["content"],
239
+ "repo_fields": ["repo"],
240
+ "path_fields": ["path"],
241
+ "license_fields": ["license"],
242
+ },
243
+ {
244
+ "name": "the_stack_v2_smol",
245
+ "dataset": "bigcode/the-stack-v2-train-smol-ids",
246
+ "config": None,
247
+ "split": "train",
248
+ "kind": "generic",
249
+ "text_fields": ["content"],
250
+ "repo_fields": ["repo_name"],
251
+ "path_fields": ["path"],
252
+ "license_fields": ["license"],
253
+ },
254
+ {
255
+ "name": "codeparrot_raw",
256
+ "dataset": "transformersbook/codeparrot",
257
+ "config": None,
258
+ "split": "train",
259
+ "kind": "generic",
260
+ "text_fields": ["content"],
261
+ "repo_fields": [],
262
+ "path_fields": [],
263
+ "license_fields": [],
264
+ }
265
  ]
266
 
267
  # ============================================================