Datasets:
Tasks:
Question Answering
Languages:
English
Size:
10K<n<100K
ArXiv:
Tags:
knowledge-base-qa
License:
Update files from the datasets library (from 1.4.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.4.0
- grail_qa.py +4 -2
grail_qa.py
CHANGED
@@ -19,12 +19,14 @@
|
|
19 |
from __future__ import absolute_import, division, print_function
|
20 |
|
21 |
import json
|
22 |
-
import logging
|
23 |
import os
|
24 |
|
25 |
import datasets
|
26 |
|
27 |
|
|
|
|
|
|
|
28 |
_CITATION = """\
|
29 |
@misc{gu2020iid,
|
30 |
title={Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Bases},
|
@@ -120,7 +122,7 @@ class GrailQA(datasets.GeneratorBasedBuilder):
|
|
120 |
|
121 |
def _generate_examples(self, filepath):
|
122 |
"""This function returns the examples in the raw (text) form."""
|
123 |
-
|
124 |
with open(filepath, encoding="utf-8") as f:
|
125 |
samples = json.load(f)
|
126 |
for sample in samples:
|
|
|
19 |
from __future__ import absolute_import, division, print_function
|
20 |
|
21 |
import json
|
|
|
22 |
import os
|
23 |
|
24 |
import datasets
|
25 |
|
26 |
|
27 |
+
logger = datasets.logging.get_logger(__name__)
|
28 |
+
|
29 |
+
|
30 |
_CITATION = """\
|
31 |
@misc{gu2020iid,
|
32 |
title={Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Bases},
|
|
|
122 |
|
123 |
def _generate_examples(self, filepath):
|
124 |
"""This function returns the examples in the raw (text) form."""
|
125 |
+
logger.info("generating examples from = %s", filepath)
|
126 |
with open(filepath, encoding="utf-8") as f:
|
127 |
samples = json.load(f)
|
128 |
for sample in samples:
|