parquet-converter
commited on
Commit
•
0dde796
1
Parent(s):
937467c
Update parquet files
Browse files- .gitattributes +0 -54
- create_examples_dataset.py +0 -44
- data/arguana.json +0 -3
- data/fiqa.json +0 -3
- data/msmarco.json → inpars--fewshot-examples/json-train.parquet +2 -2
.gitattributes
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
6 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
8 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.lz4 filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
29 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
30 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
31 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
32 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
35 |
-
# Audio files - uncompressed
|
36 |
-
*.pcm filter=lfs diff=lfs merge=lfs -text
|
37 |
-
*.sam filter=lfs diff=lfs merge=lfs -text
|
38 |
-
*.raw filter=lfs diff=lfs merge=lfs -text
|
39 |
-
# Audio files - compressed
|
40 |
-
*.aac filter=lfs diff=lfs merge=lfs -text
|
41 |
-
*.flac filter=lfs diff=lfs merge=lfs -text
|
42 |
-
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
43 |
-
*.ogg filter=lfs diff=lfs merge=lfs -text
|
44 |
-
*.wav filter=lfs diff=lfs merge=lfs -text
|
45 |
-
# Image files - uncompressed
|
46 |
-
*.bmp filter=lfs diff=lfs merge=lfs -text
|
47 |
-
*.gif filter=lfs diff=lfs merge=lfs -text
|
48 |
-
*.png filter=lfs diff=lfs merge=lfs -text
|
49 |
-
*.tiff filter=lfs diff=lfs merge=lfs -text
|
50 |
-
# Image files - compressed
|
51 |
-
*.jpg filter=lfs diff=lfs merge=lfs -text
|
52 |
-
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
53 |
-
*.webp filter=lfs diff=lfs merge=lfs -text
|
54 |
-
*.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
create_examples_dataset.py
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
import ftfy
|
2 |
-
import json
|
3 |
-
import random
|
4 |
-
random.seed(1)
|
5 |
-
import argparse
|
6 |
-
import ir_datasets
|
7 |
-
from tqdm.auto import tqdm
|
8 |
-
|
9 |
-
def load_examples(base_dataset):
|
10 |
-
dataset = ir_datasets.load(base_dataset)
|
11 |
-
|
12 |
-
documents = {}
|
13 |
-
for doc in tqdm(
|
14 |
-
dataset.docs_iter(), total=dataset.docs_count(), desc="Loading documents"
|
15 |
-
):
|
16 |
-
text = (
|
17 |
-
f"{doc.title} {doc.text}"
|
18 |
-
if "title" in dataset.docs_cls()._fields
|
19 |
-
else doc.text
|
20 |
-
)
|
21 |
-
documents[doc.doc_id] = ftfy.fix_text(text)
|
22 |
-
|
23 |
-
queries = {}
|
24 |
-
for query in dataset.queries_iter():
|
25 |
-
queries[query.query_id] = ftfy.fix_text(query.text)
|
26 |
-
|
27 |
-
return [
|
28 |
-
(queries[qrel.query_id], documents[qrel.doc_id])
|
29 |
-
for qrel in dataset.qrels_iter()
|
30 |
-
]
|
31 |
-
|
32 |
-
if __name__ == "__main__":
|
33 |
-
parser = argparse.ArgumentParser()
|
34 |
-
parser.add_argument('--num_examples', default=500_000)
|
35 |
-
parser.add_argument('--dataset', default='beir/msmarco/train')
|
36 |
-
parser.add_argument('--output', required=True)
|
37 |
-
args = parser.parse_args()
|
38 |
-
|
39 |
-
examples = load_examples(args.dataset)
|
40 |
-
random.shuffle(examples)
|
41 |
-
|
42 |
-
with open(args.output, 'w') as f:
|
43 |
-
for (query, document) in tqdm(examples[:args.num_examples], total=args.num_examples, desc='Writing'):
|
44 |
-
f.write(json.dumps({'query': query, 'document': document}) + '\n')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/arguana.json
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:1b9f3903fa31e5a43f39b624d127a128863ef784dc75fcacdc559e31aa2d1f4a
|
3 |
-
size 2937902
|
|
|
|
|
|
|
|
data/fiqa.json
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:37514b863d14528803afe65f21c749971ffca43628b2303ced3d4483daf559f9
|
3 |
-
size 15928747
|
|
|
|
|
|
|
|
data/msmarco.json → inpars--fewshot-examples/json-train.parquet
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:0056d9ea14a5c6ea845d6e02b8aa3c5621b9611536bf0990b33d40eda4e164ae
|
3 |
+
size 138883059
|