Update open_data_26B_tokens_balanced_es_ca.py
Browse files
open_data_26B_tokens_balanced_es_ca.py
CHANGED
|
@@ -144,7 +144,11 @@ class Cerebras(datasets.GeneratorBasedBuilder):
|
|
| 144 |
def _generate_examples(self, filepath, split):
|
| 145 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
| 146 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
| 147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
if len(parts_paths) == 0:
|
| 149 |
raise FileNotFoundError(filepath)
|
| 150 |
for path in parts_paths:
|
|
|
|
| 144 |
def _generate_examples(self, filepath, split):
|
| 145 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
| 146 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
| 147 |
+
if '*' in filepath:
|
| 148 |
+
parts_paths = [filepath.split('*')[0] + str(i) + '.jsonl' for i in range(64)]
|
| 149 |
+
else:
|
| 150 |
+
parts_paths = [filepath]
|
| 151 |
+
# parts_paths = glob.glob(filepath)
|
| 152 |
if len(parts_paths) == 0:
|
| 153 |
raise FileNotFoundError(filepath)
|
| 154 |
for path in parts_paths:
|