Datasets:

Sub-tasks:
extractive-qa
Languages:
English
ArXiv:
License:
albertvillanova HF staff commited on
Commit
3d1b2f2
1 Parent(s): 63e2429

Support streaming (#2)

Browse files

- Add data file (efba09a84485856915e39383e37edac05f297f33)
- Update script to use local data file (45259c927b2b58919ae560e7e95b125443bf4db1)
- Fix data dir on Windows machines (4adb20b28be42fdd7691b5f88d2077757972710c)

Files changed (2) hide show
  1. data.zip +3 -0
  2. subjqa.py +6 -4
data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3d58fd04c698fccb326b7ea4ea93098cc2186a3925f4bbad9b538ed7acc72db
3
+ size 11384657
subjqa.py CHANGED
@@ -48,7 +48,8 @@ _HOMEPAGE = ""
48
 
49
  _LICENSE = ""
50
 
51
- _URLs = {"default": "https://github.com/lewtun/SubjQA/archive/refs/heads/master.zip"}
 
52
 
53
 
54
  class Subjqa(datasets.GeneratorBasedBuilder):
@@ -104,23 +105,24 @@ class Subjqa(datasets.GeneratorBasedBuilder):
104
 
105
  def _split_generators(self, dl_manager):
106
  data_dir = dl_manager.download_and_extract(_URLs["default"])
 
107
  return [
108
  datasets.SplitGenerator(
109
  name=datasets.Split.TRAIN,
110
  gen_kwargs={
111
- "filepath": os.path.join(data_dir, f"SubjQA-master/SubjQA/{self.config.name}/splits/train.csv")
112
  },
113
  ),
114
  datasets.SplitGenerator(
115
  name=datasets.Split.TEST,
116
  gen_kwargs={
117
- "filepath": os.path.join(data_dir, f"SubjQA-master/SubjQA/{self.config.name}/splits/test.csv")
118
  },
119
  ),
120
  datasets.SplitGenerator(
121
  name=datasets.Split.VALIDATION,
122
  gen_kwargs={
123
- "filepath": os.path.join(data_dir, f"SubjQA-master/SubjQA/{self.config.name}/splits/dev.csv")
124
  },
125
  ),
126
  ]
 
48
 
49
  _LICENSE = ""
50
 
51
+ # From: https://github.com/lewtun/SubjQA/archive/refs/heads/master.zip
52
+ _URLs = {"default": "data.zip"}
53
 
54
 
55
  class Subjqa(datasets.GeneratorBasedBuilder):
 
105
 
106
  def _split_generators(self, dl_manager):
107
  data_dir = dl_manager.download_and_extract(_URLs["default"])
108
+ data_dir = os.path.join(data_dir, "SubjQA-master", "SubjQA", self.config.name, "splits")
109
  return [
110
  datasets.SplitGenerator(
111
  name=datasets.Split.TRAIN,
112
  gen_kwargs={
113
+ "filepath": os.path.join(data_dir, "train.csv")
114
  },
115
  ),
116
  datasets.SplitGenerator(
117
  name=datasets.Split.TEST,
118
  gen_kwargs={
119
+ "filepath": os.path.join(data_dir, "test.csv")
120
  },
121
  ),
122
  datasets.SplitGenerator(
123
  name=datasets.Split.VALIDATION,
124
  gen_kwargs={
125
+ "filepath": os.path.join(data_dir, "dev.csv")
126
  },
127
  ),
128
  ]