Datasets:
Update quakeset.py
Browse files- 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 |
-
|
| 108 |
return [
|
| 109 |
datasets.SplitGenerator(
|
| 110 |
name=datasets.Split.TRAIN,
|
| 111 |
# These kwargs will be passed to _generate_examples
|
| 112 |
gen_kwargs={
|
| 113 |
-
"filepath":
|
| 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":
|
| 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":
|
| 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 |
),
|