Sebastian Gehrmann
commited on
Commit
•
bf370b5
1
Parent(s):
00fd900
xsum.py
CHANGED
@@ -133,6 +133,7 @@ class Xsum(datasets.GeneratorBasedBuilder):
|
|
133 |
def _generate_examples(self, filepath, split, filepaths=None):
|
134 |
"""Yields examples."""
|
135 |
if "challenge" in split:
|
|
|
136 |
if "covid" in split:
|
137 |
with open(filepath, encoding="utf-8") as f:
|
138 |
id_ = -1
|
@@ -157,6 +158,7 @@ class Xsum(datasets.GeneratorBasedBuilder):
|
|
157 |
exple["gem_id"] = f"{self.config.name}-{split}-{id_}"
|
158 |
yield id_, exple
|
159 |
else:
|
|
|
160 |
with open(filepath, "r", encoding="utf-8") as f:
|
161 |
split_ids = json.load(f)
|
162 |
for id_, i in enumerate(split_ids[split]):
|
|
|
133 |
def _generate_examples(self, filepath, split, filepaths=None):
|
134 |
"""Yields examples."""
|
135 |
if "challenge" in split:
|
136 |
+
print(split)
|
137 |
if "covid" in split:
|
138 |
with open(filepath, encoding="utf-8") as f:
|
139 |
id_ = -1
|
|
|
158 |
exple["gem_id"] = f"{self.config.name}-{split}-{id_}"
|
159 |
yield id_, exple
|
160 |
else:
|
161 |
+
print("ENDED UP HERE", split)
|
162 |
with open(filepath, "r", encoding="utf-8") as f:
|
163 |
split_ids = json.load(f)
|
164 |
for id_, i in enumerate(split_ids[split]):
|