drt commited on
Commit
7ff48d8
1 Parent(s): 37d63be

Load json files locally

Browse files
Files changed (1) hide show
  1. kqa_pro.py +5 -9
kqa_pro.py CHANGED
@@ -43,13 +43,11 @@ class KQAPro(datasets.GeneratorBasedBuilder):
43
  BUILDER_CONFIGS = [
44
  KQAProConfig(
45
  name=_TRAIN_CONFIG_NAME,
46
- description="KQA Pro",
47
- data_dir="data"
48
  ),
49
  KQAProConfig(
50
  name=_TEST_CONFIG_NAME,
51
- description="KQA Pro",
52
- data_dir="data"
53
  ),
54
  ]
55
 
@@ -95,12 +93,10 @@ class KQAPro(datasets.GeneratorBasedBuilder):
95
 
96
 
97
  def _split_generators(self, dl_manager):
98
- download_dir = dl_manager.download_and_extract(_DOWNLOAD_URL)
99
- data_dir = os.path.join(download_dir, self.config.data_dir)
100
  downloaded_files = {
101
- "train": os.path.join(data_dir, "train.json"),
102
- "val": os.path.join(data_dir, "val.json"),
103
- "test": os.path.join(data_dir, "test.json")
104
  }
105
 
106
  if self.config.name == _TEST_CONFIG_NAME:
 
43
  BUILDER_CONFIGS = [
44
  KQAProConfig(
45
  name=_TRAIN_CONFIG_NAME,
46
+ description="KQA Pro"
 
47
  ),
48
  KQAProConfig(
49
  name=_TEST_CONFIG_NAME,
50
+ description="KQA Pro"
 
51
  ),
52
  ]
53
 
 
93
 
94
 
95
  def _split_generators(self, dl_manager):
 
 
96
  downloaded_files = {
97
+ "train": "train.json",
98
+ "val": "val.json",
99
+ "test": "test.json"
100
  }
101
 
102
  if self.config.name == _TEST_CONFIG_NAME: