Update files from the datasets library (from 1.9.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.9.0
README.md
CHANGED
@@ -269,10 +269,17 @@ trivia_qa = load_dataset('trivia_qa', 'unfiltered.nocontext')
|
|
269 |
|
270 |
# The KILT IDs can then be mapped to the TriviaQA questions with:
|
271 |
triviaqa_map = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
for k in ['train', 'validation', 'test']:
|
273 |
triviaqa_map = dict([(q_id, i) for i, q_id in enumerate(trivia_qa[k]['question_id'])])
|
274 |
kilt_triviaqa[k] = kilt_triviaqa[k].filter(lambda x: x['id'] in triviaqa_map)
|
275 |
-
kilt_triviaqa[k] = kilt_triviaqa[k].map(
|
276 |
```
|
277 |
|
278 |
### Supported Tasks and Leaderboards
|
@@ -406,7 +413,22 @@ Examples from all configurations have the following features:
|
|
406 |
|
407 |
### Data Splits
|
408 |
|
409 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
## Dataset Creation
|
412 |
|
@@ -464,8 +486,42 @@ Examples from all configurations have the following features:
|
|
464 |
|
465 |
### Citation Information
|
466 |
|
467 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
|
469 |
### Contributions
|
470 |
|
471 |
-
Thanks to [@thomwolf](https://github.com/thomwolf), [@yjernite](https://github.com/yjernite) for adding this dataset.
|
|
|
269 |
|
270 |
# The KILT IDs can then be mapped to the TriviaQA questions with:
|
271 |
triviaqa_map = {}
|
272 |
+
|
273 |
+
def add_missing_data(x, trivia_qa_subset, triviaqa_map):
|
274 |
+
i = triviaqa_map[x['id']]
|
275 |
+
x['input'] = trivia_qa_subset[i]['question']
|
276 |
+
x['output']['original_answer'] = trivia_qa_subset[i]['answer']['value']
|
277 |
+
return x
|
278 |
+
|
279 |
for k in ['train', 'validation', 'test']:
|
280 |
triviaqa_map = dict([(q_id, i) for i, q_id in enumerate(trivia_qa[k]['question_id'])])
|
281 |
kilt_triviaqa[k] = kilt_triviaqa[k].filter(lambda x: x['id'] in triviaqa_map)
|
282 |
+
kilt_triviaqa[k] = kilt_triviaqa[k].map(add_missing_data, fn_kwargs=dict(trivia_qa_subset=trivia_qa[k], triviaqa_map=triviaqa_map))
|
283 |
```
|
284 |
|
285 |
### Supported Tasks and Leaderboards
|
|
|
413 |
|
414 |
### Data Splits
|
415 |
|
416 |
+
The configurations have the following splits:
|
417 |
+
|
418 |
+
| | Train | Validation | Test |
|
419 |
+
| ----------- | ----------- | ----------- | ----------- |
|
420 |
+
| triviaqa | 61844 | 5359 | 6586 |
|
421 |
+
| fever | 104966 | 10444 | 10100 |
|
422 |
+
| aidayago2 | 18395 | 4784 | 4463 |
|
423 |
+
| wned | | 3396 | 3376 |
|
424 |
+
| cweb | | 5599 | 5543 |
|
425 |
+
| trex | 2284168 | 5000 | 5000 |
|
426 |
+
| structured_zeroshot | 147909 | 3724 | 4966 |
|
427 |
+
| nq | 87372 | 2837 | 1444 |
|
428 |
+
| hotpotqa | 88869 | 5600 | 5569 |
|
429 |
+
| eli5 | 272634 | 1507 | 600 |
|
430 |
+
| wow | 94577 | 3058 | 2944 |
|
431 |
+
|
432 |
|
433 |
## Dataset Creation
|
434 |
|
|
|
486 |
|
487 |
### Citation Information
|
488 |
|
489 |
+
Cite as:
|
490 |
+
```
|
491 |
+
@inproceedings{kilt_tasks,
|
492 |
+
author = {Fabio Petroni and
|
493 |
+
Aleksandra Piktus and
|
494 |
+
Angela Fan and
|
495 |
+
Patrick S. H. Lewis and
|
496 |
+
Majid Yazdani and
|
497 |
+
Nicola De Cao and
|
498 |
+
James Thorne and
|
499 |
+
Yacine Jernite and
|
500 |
+
Vladimir Karpukhin and
|
501 |
+
Jean Maillard and
|
502 |
+
Vassilis Plachouras and
|
503 |
+
Tim Rockt{\"{a}}schel and
|
504 |
+
Sebastian Riedel},
|
505 |
+
editor = {Kristina Toutanova and
|
506 |
+
Anna Rumshisky and
|
507 |
+
Luke Zettlemoyer and
|
508 |
+
Dilek Hakkani{-}T{\"{u}}r and
|
509 |
+
Iz Beltagy and
|
510 |
+
Steven Bethard and
|
511 |
+
Ryan Cotterell and
|
512 |
+
Tanmoy Chakraborty and
|
513 |
+
Yichao Zhou},
|
514 |
+
title = {{KILT:} a Benchmark for Knowledge Intensive Language Tasks},
|
515 |
+
booktitle = {Proceedings of the 2021 Conference of the North American Chapter of
|
516 |
+
the Association for Computational Linguistics: Human Language Technologies,
|
517 |
+
{NAACL-HLT} 2021, Online, June 6-11, 2021},
|
518 |
+
pages = {2523--2544},
|
519 |
+
publisher = {Association for Computational Linguistics},
|
520 |
+
year = {2021},
|
521 |
+
url = {https://www.aclweb.org/anthology/2021.naacl-main.200/}
|
522 |
+
}
|
523 |
+
```
|
524 |
|
525 |
### Contributions
|
526 |
|
527 |
+
Thanks to [@thomwolf](https://github.com/thomwolf), [@yjernite](https://github.com/yjernite) for adding this dataset.
|