Howuhh commited on
Commit
ad0cf71
·
1 Parent(s): 0e2cd17

Upload nle_hf_dataset.py

Browse files
Files changed (1) hide show
  1. nle_hf_dataset.py +6 -2
nle_hf_dataset.py CHANGED
@@ -106,8 +106,12 @@ class NleHfDataset(datasets.GeneratorBasedBuilder):
106
  )
107
 
108
  def _split_generators(self, dl_manager):
109
- urls = _URLS[self.config.name]
110
- filepaths = [dl_manager.download(url) for url in urls]
 
 
 
 
111
  return [
112
  datasets.SplitGenerator(
113
  name=datasets.Split.TRAIN, gen_kwargs={"filepaths": filepaths})
 
106
  )
107
 
108
  def _split_generators(self, dl_manager):
109
+ if self.config.data_files is None:
110
+ urls = _URLS[self.config.name]
111
+ filepaths = [dl_manager.download(url) for url in urls]
112
+ else:
113
+ filepaths = self.config.data_files
114
+
115
  return [
116
  datasets.SplitGenerator(
117
  name=datasets.Split.TRAIN, gen_kwargs={"filepaths": filepaths})