Datasets:

Sub-tasks:
extractive-qa
Languages:
English
Multilinguality:
monolingual
Size Categories:
10K<n<100K
Language Creators:
crowdsourced
found
Annotations Creators:
crowdsourced
Source Datasets:
original
License:
system HF staff commited on
Commit
350347c
1 Parent(s): 835b8af

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

Files changed (1) hide show
  1. squadshifts.py +9 -13
squadshifts.py CHANGED
@@ -20,7 +20,6 @@ from __future__ import absolute_import, division, print_function
20
 
21
  import json
22
  import logging
23
- import os
24
 
25
  import datasets
26
 
@@ -46,6 +45,14 @@ robustness to natural distribution shifts. We encourage SQuAD model developers \
46
  to also evaluate their methods on these new datasets! \
47
  """
48
 
 
 
 
 
 
 
 
 
49
 
50
  class SquadShiftsConfig(datasets.BuilderConfig):
51
  """BuilderConfig for SquadShifts."""
@@ -62,12 +69,6 @@ class SquadShiftsConfig(datasets.BuilderConfig):
62
  class SquadShifts(datasets.GeneratorBasedBuilder):
63
  """SquadShifts consists of four new test sets for the SQUAD dataset."""
64
 
65
- _URL = "https://raw.githubusercontent.com/modestyachts/squadshifts-website/master/datasets"
66
- _NEW_WIKI_FILE = "new_wiki_v1.0.json"
67
- _NYT_FILE = "nyt_v1.0.json"
68
- _REDDIT_FILE = "reddit_v1.0.json"
69
- _AMAZON_FILE = "amazon_reviews_v1.0.json"
70
-
71
  BUILDER_CONFIGS = [
72
  SquadShiftsConfig(
73
  name="new_wiki",
@@ -116,12 +117,7 @@ class SquadShifts(datasets.GeneratorBasedBuilder):
116
  )
117
 
118
  def _split_generators(self, dl_manager):
119
- urls_to_download = {
120
- "new_wiki": os.path.join(self._URL, self._NEW_WIKI_FILE),
121
- "nyt": os.path.join(self._URL, self._NYT_FILE),
122
- "reddit": os.path.join(self._URL, self._REDDIT_FILE),
123
- "amazon": os.path.join(self._URL, self._AMAZON_FILE),
124
- }
125
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
126
 
127
  if self.config.name == "new_wiki" or self.config.name == "default":
 
20
 
21
  import json
22
  import logging
 
23
 
24
  import datasets
25
 
 
45
  to also evaluate their methods on these new datasets! \
46
  """
47
 
48
+ _URL = "https://raw.githubusercontent.com/modestyachts/squadshifts-website/master/datasets/"
49
+ _URLS = {
50
+ "new_wiki": _URL + "new_wiki_v1.0.json",
51
+ "nyt": _URL + "nyt_v1.0.json",
52
+ "reddit": _URL + "reddit_v1.0.json",
53
+ "amazon": _URL + "amazon_reviews_v1.0.json",
54
+ }
55
+
56
 
57
  class SquadShiftsConfig(datasets.BuilderConfig):
58
  """BuilderConfig for SquadShifts."""
 
69
  class SquadShifts(datasets.GeneratorBasedBuilder):
70
  """SquadShifts consists of four new test sets for the SQUAD dataset."""
71
 
 
 
 
 
 
 
72
  BUILDER_CONFIGS = [
73
  SquadShiftsConfig(
74
  name="new_wiki",
 
117
  )
118
 
119
  def _split_generators(self, dl_manager):
120
+ urls_to_download = _URLS
 
 
 
 
 
121
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
122
 
123
  if self.config.name == "new_wiki" or self.config.name == "default":