DarthReca commited on
Commit
a899312
·
verified ·
1 Parent(s): bead1d2

Update quakeset.py

Browse files
Files changed (1) hide show
  1. quakeset.py +4 -4
quakeset.py CHANGED
@@ -104,13 +104,13 @@ class QuakeSet(datasets.GeneratorBasedBuilder):
104
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
105
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
106
  urls = _URLS
107
- data_dir = dl_manager.download(urls)
108
  return [
109
  datasets.SplitGenerator(
110
  name=datasets.Split.TRAIN,
111
  # These kwargs will be passed to _generate_examples
112
  gen_kwargs={
113
- "filepath": os.path.join(data_dir, "earthquakes.h5"),
114
  "split": "train",
115
  },
116
  ),
@@ -118,7 +118,7 @@ class QuakeSet(datasets.GeneratorBasedBuilder):
118
  name=datasets.Split.VALIDATION,
119
  # These kwargs will be passed to _generate_examples
120
  gen_kwargs={
121
- "filepath": os.path.join(data_dir, "earthquakes.h5"),
122
  "split": "validation",
123
  },
124
  ),
@@ -126,7 +126,7 @@ class QuakeSet(datasets.GeneratorBasedBuilder):
126
  name=datasets.Split.TEST,
127
  # These kwargs will be passed to _generate_examples
128
  gen_kwargs={
129
- "filepath": os.path.join(data_dir, "earthquakes.h5"),
130
  "split": "test",
131
  },
132
  ),
 
104
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
105
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
106
  urls = _URLS
107
+ hdf5_file = dl_manager.download(urls)
108
  return [
109
  datasets.SplitGenerator(
110
  name=datasets.Split.TRAIN,
111
  # These kwargs will be passed to _generate_examples
112
  gen_kwargs={
113
+ "filepath": hdf5_file,
114
  "split": "train",
115
  },
116
  ),
 
118
  name=datasets.Split.VALIDATION,
119
  # These kwargs will be passed to _generate_examples
120
  gen_kwargs={
121
+ "filepath": hdf5_file,
122
  "split": "validation",
123
  },
124
  ),
 
126
  name=datasets.Split.TEST,
127
  # These kwargs will be passed to _generate_examples
128
  gen_kwargs={
129
+ "filepath": hdf5_file,
130
  "split": "test",
131
  },
132
  ),