Datasets:
Vaibhav Adlakha commited on
Commit ·
543f3fc
1
Parent(s): adcd815
replacing json with jsonl files
Browse files
.gitattributes
CHANGED
|
@@ -37,3 +37,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 37 |
*.ogg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 39 |
*.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 37 |
*.ogg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 39 |
*.json filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
*.jsonl filter=lfs diff=lfs merge=lfs -text
|
data/{topiocqa_train.json → topiocqa_train.jsonl}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05f6222e849ac1096b63f463e398c46c195c344a8f065134b9d37360b9dc4a4d
|
| 3 |
+
size 54692422
|
data/{topiocqa_valid.json → topiocqa_valid.jsonl}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1598add3b55eb093d8642adb73bc7b7e380af9a80eb4c4c0fc0a48a35b2d667
|
| 3 |
+
size 5770381
|
json_to_jsonl.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
for split in ["train", "valid"]:
|
| 6 |
+
|
| 7 |
+
with open(f"data/topiocqa_{split}.json", "r") as f:
|
| 8 |
+
data = json.load(f)
|
| 9 |
+
|
| 10 |
+
with open(f"data/topiocqa_{split}.jsonl", "w") as f:
|
| 11 |
+
for i, turn in enumerate(data):
|
| 12 |
+
f.write(json.dumps(turn) + "\n")
|
| 13 |
+
if i % 1000 == 0:
|
| 14 |
+
print(i)
|