Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
zhangirazerbayev
commited on
Commit
•
d61f006
1
Parent(s):
9b04248
make dataset viewer work
Browse files- proof-pile.py +1 -3
proof-pile.py
CHANGED
@@ -16,9 +16,7 @@
|
|
16 |
|
17 |
import csv
|
18 |
import json
|
19 |
-
import ndjson
|
20 |
import os
|
21 |
-
import sys # just for debugging, delete
|
22 |
|
23 |
import itertools
|
24 |
from itertools import islice
|
@@ -142,7 +140,7 @@ class ProofPile(datasets.GeneratorBasedBuilder):
|
|
142 |
key = 0
|
143 |
for name in data_files:
|
144 |
with open(name) as f:
|
145 |
-
instances =
|
146 |
for instance in instances:
|
147 |
yield key, {"text": instance["text"],
|
148 |
"meta": json.dumps(instance["meta"])}
|
|
|
16 |
|
17 |
import csv
|
18 |
import json
|
|
|
19 |
import os
|
|
|
20 |
|
21 |
import itertools
|
22 |
from itertools import islice
|
|
|
140 |
key = 0
|
141 |
for name in data_files:
|
142 |
with open(name) as f:
|
143 |
+
instances = [json.load(x) for x in f.readlines() if x]
|
144 |
for instance in instances:
|
145 |
yield key, {"text": instance["text"],
|
146 |
"meta": json.dumps(instance["meta"])}
|