Update files from the datasets library (from 1.6.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.6.0
- trivia_qa.py +1 -4
trivia_qa.py
CHANGED
@@ -16,14 +16,11 @@
|
|
16 |
# Lint as: python3
|
17 |
"""TriviaQA: A Reading Comprehension Dataset."""
|
18 |
|
19 |
-
from __future__ import absolute_import, division, print_function
|
20 |
|
21 |
import glob
|
22 |
import json
|
23 |
import os
|
24 |
|
25 |
-
import six
|
26 |
-
|
27 |
import datasets
|
28 |
|
29 |
|
@@ -260,7 +257,7 @@ class TriviaQa(datasets.GeneratorBasedBuilder):
|
|
260 |
return new_items
|
261 |
|
262 |
def _strip_if_str(v):
|
263 |
-
return v.strip() if isinstance(v,
|
264 |
|
265 |
def _transpose_and_strip_dicts(dicts, field_names):
|
266 |
return {
|
|
|
16 |
# Lint as: python3
|
17 |
"""TriviaQA: A Reading Comprehension Dataset."""
|
18 |
|
|
|
19 |
|
20 |
import glob
|
21 |
import json
|
22 |
import os
|
23 |
|
|
|
|
|
24 |
import datasets
|
25 |
|
26 |
|
|
|
257 |
return new_items
|
258 |
|
259 |
def _strip_if_str(v):
|
260 |
+
return v.strip() if isinstance(v, str) else v
|
261 |
|
262 |
def _transpose_and_strip_dicts(dicts, field_names):
|
263 |
return {
|