Update markushgrapher-datasets.py
Browse files
markushgrapher-datasets.py
CHANGED
|
@@ -87,7 +87,13 @@ class MarkushGrapherDataset(GeneratorBasedBuilder):
|
|
| 87 |
return splits
|
| 88 |
|
| 89 |
def _generate_examples(self, data_dir):
|
| 90 |
-
arrow_files = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
for file in arrow_files:
|
| 92 |
dataset = Dataset.from_file(file)
|
| 93 |
for i, row in enumerate(dataset):
|
|
|
|
| 87 |
return splits
|
| 88 |
|
| 89 |
def _generate_examples(self, data_dir):
|
| 90 |
+
arrow_files = []
|
| 91 |
+
for root, _, files in os.walk(data_dir):
|
| 92 |
+
for f in files:
|
| 93 |
+
if f.endswith(".arrow"):
|
| 94 |
+
arrow_files.append(os.path.join(root, f))
|
| 95 |
+
arrow_files = [f for f in arrow_files if self.config.name in f]
|
| 96 |
+
|
| 97 |
for file in arrow_files:
|
| 98 |
dataset = Dataset.from_file(file)
|
| 99 |
for i, row in enumerate(dataset):
|