Datasets:

Modalities:
Text
Languages:
code
ArXiv:
Libraries:
Datasets
License:
taisazero lhoestq HF staff commited on
Commit
8460c43
1 Parent(s): a187ec5

Fix get_patterns_in_dataset_repository error (#5)

Browse files

- Fix get_patterns_in_dataset_repository error (56ebe8e816bc4a8979b6b694b80966216027feaf)


Co-authored-by: Quentin Lhoest <lhoestq@users.noreply.huggingface.co>

Files changed (1) hide show
  1. code_clippy_github.py +6 -13
code_clippy_github.py CHANGED
@@ -156,19 +156,12 @@ class CodeClippyGithub(datasets.GeneratorBasedBuilder):
156
  )
157
 
158
  def _split_generators(self, dl_manager):
159
-
160
- hfh_dataset_info = HfApi(datasets.config.HF_ENDPOINT).dataset_info(
161
- _REPO_NAME,
162
- timeout=100.0,
163
- )
164
-
165
- patterns = datasets.data_files.get_patterns_in_dataset_repository(hfh_dataset_info)
166
- data_files = datasets.data_files.DataFilesDict.from_hf_repo(
167
- patterns,
168
- dataset_info=hfh_dataset_info,
169
- )
170
-
171
- files = dl_manager.download_and_extract(data_files["train"])
172
  return [
173
  datasets.SplitGenerator(
174
  name=datasets.Split.TRAIN,
 
156
  )
157
 
158
  def _split_generators(self, dl_manager):
159
+ num_shards = 50_000
160
+ data_files = [
161
+ f"github-dedup-{_index:012d}.json.gz"
162
+ for _index in range(num_shards)
163
+ ]
164
+ files = dl_manager.download(data_files)
 
 
 
 
 
 
 
165
  return [
166
  datasets.SplitGenerator(
167
  name=datasets.Split.TRAIN,