Datasets:

Sub-tasks:
extractive-qa
Languages:
English
ArXiv:
License:
albertvillanova HF staff commited on
Commit
4adb20b
1 Parent(s): 45259c9

Fix data dir on Windows machines

Browse files
Files changed (1) hide show
  1. subjqa.py +4 -3
subjqa.py CHANGED
@@ -105,23 +105,24 @@ class Subjqa(datasets.GeneratorBasedBuilder):
105
 
106
  def _split_generators(self, dl_manager):
107
  data_dir = dl_manager.download_and_extract(_URLs["default"])
 
108
  return [
109
  datasets.SplitGenerator(
110
  name=datasets.Split.TRAIN,
111
  gen_kwargs={
112
- "filepath": os.path.join(data_dir, f"SubjQA-master/SubjQA/{self.config.name}/splits/train.csv")
113
  },
114
  ),
115
  datasets.SplitGenerator(
116
  name=datasets.Split.TEST,
117
  gen_kwargs={
118
- "filepath": os.path.join(data_dir, f"SubjQA-master/SubjQA/{self.config.name}/splits/test.csv")
119
  },
120
  ),
121
  datasets.SplitGenerator(
122
  name=datasets.Split.VALIDATION,
123
  gen_kwargs={
124
- "filepath": os.path.join(data_dir, f"SubjQA-master/SubjQA/{self.config.name}/splits/dev.csv")
125
  },
126
  ),
127
  ]
 
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
  ]