maximedb commited on
Commit
f425790
·
1 Parent(s): 05ea816

fix dl of files

Browse files
Files changed (1) hide show
  1. wow.py +6 -3
wow.py CHANGED
@@ -57,18 +57,21 @@ class WOW(datasets.GeneratorBasedBuilder):
57
  )
58
 
59
  def _split_generators(self, dl_manager):
 
 
 
60
  return [
61
  datasets.SplitGenerator(
62
  name=datasets.Split.TRAIN,
63
- gen_kwargs={"filename": "data/train.json"},
64
  ),
65
  datasets.SplitGenerator(
66
  name=datasets.Split.VALIDATION,
67
- gen_kwargs={"filename": f"data/valid_{self.config.split}_split.json"},
68
  ),
69
  datasets.SplitGenerator(
70
  name=datasets.Split.TEST,
71
- gen_kwargs={"filename": f"data/test_{self.config.split}_split.json"},
72
  )
73
  ]
74
 
 
57
  )
58
 
59
  def _split_generators(self, dl_manager):
60
+ train_filename = dl_manager.download_and_extract("data/train.json")
61
+ valid_filename = dl_manager.download_and_extract(f"data/valid_{self.config.split}_split.json")
62
+ test_filename = dl_manager.download_and_extract(f"data/test_{self.config.split}_split.json")
63
  return [
64
  datasets.SplitGenerator(
65
  name=datasets.Split.TRAIN,
66
+ gen_kwargs={"filename": train_filename},
67
  ),
68
  datasets.SplitGenerator(
69
  name=datasets.Split.VALIDATION,
70
+ gen_kwargs={"filename": valid_filename},
71
  ),
72
  datasets.SplitGenerator(
73
  name=datasets.Split.TEST,
74
+ gen_kwargs={"filename": test_filename},
75
  )
76
  ]
77