Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
Zhangir Azerbayev
commited on
Commit
·
92774d7
1
Parent(s):
d499bae
unbroke breaking changes
Browse files- proof-pile.py +10 -6
proof-pile.py
CHANGED
@@ -226,12 +226,14 @@ class ProofPile(datasets.GeneratorBasedBuilder):
|
|
226 |
if self.config.name in self.archived_configs:
|
227 |
for name, obj in data_files:
|
228 |
text = obj.read().decode()
|
229 |
-
# Yields examples as (key, example) tuples
|
230 |
yield key, {
|
231 |
-
"config": self.config.name,
|
232 |
-
"file": name,
|
233 |
"text": text,
|
234 |
-
|
|
|
|
|
|
|
|
|
235 |
key += 1
|
236 |
elif self.config.name in self.jsonl_configs:
|
237 |
key = 0
|
@@ -248,8 +250,10 @@ class ProofPile(datasets.GeneratorBasedBuilder):
|
|
248 |
text = f.read()
|
249 |
# Yields examples as (key, example) tuples
|
250 |
yield key, {
|
251 |
-
"config": self.config.name,
|
252 |
-
"file": name,
|
253 |
"text": text,
|
|
|
|
|
|
|
|
|
254 |
}
|
255 |
key += 1
|
|
|
226 |
if self.config.name in self.archived_configs:
|
227 |
for name, obj in data_files:
|
228 |
text = obj.read().decode()
|
229 |
+
# Yields examples as (key, example) tuples
|
230 |
yield key, {
|
|
|
|
|
231 |
"text": text,
|
232 |
+
"meta": json.dumps({
|
233 |
+
"config": self.config.name,
|
234 |
+
"file": name,
|
235 |
+
})
|
236 |
+
}
|
237 |
key += 1
|
238 |
elif self.config.name in self.jsonl_configs:
|
239 |
key = 0
|
|
|
250 |
text = f.read()
|
251 |
# Yields examples as (key, example) tuples
|
252 |
yield key, {
|
|
|
|
|
253 |
"text": text,
|
254 |
+
"meta": json.dumps({
|
255 |
+
"config": self.config.name,
|
256 |
+
"file": name,
|
257 |
+
})
|
258 |
}
|
259 |
key += 1
|