Upload odinsynth_dataset.py
Browse files- odinsynth_dataset.py +5 -5
odinsynth_dataset.py
CHANGED
@@ -90,15 +90,15 @@ class OdinsynthDatasetBuilder(datasets.GeneratorBasedBuilder):
|
|
90 |
def _split_generators(self, dl_manager):
|
91 |
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
|
92 |
|
93 |
-
JSON_PATH =
|
94 |
-
|
95 |
specs = self._build_specs(JSON_PATH)
|
96 |
return [
|
97 |
datasets.SplitGenerator(
|
98 |
name=datasets.Split.TRAIN,
|
99 |
# These kwargs will be passed to _generate_examples
|
100 |
gen_kwargs={
|
101 |
-
"archive_iter": dl_manager.iter_archive(
|
102 |
"specs": specs,
|
103 |
"split": "train",
|
104 |
},
|
@@ -107,7 +107,7 @@ class OdinsynthDatasetBuilder(datasets.GeneratorBasedBuilder):
|
|
107 |
name=datasets.Split.TEST,
|
108 |
# These kwargs will be passed to _generate_examples
|
109 |
gen_kwargs={
|
110 |
-
"archive_iter": dl_manager.iter_archive(
|
111 |
"specs": specs,
|
112 |
"split": "test",
|
113 |
},
|
@@ -116,7 +116,7 @@ class OdinsynthDatasetBuilder(datasets.GeneratorBasedBuilder):
|
|
116 |
name=datasets.Split.VALIDATION,
|
117 |
# These kwargs will be passed to _generate_examples
|
118 |
gen_kwargs={
|
119 |
-
"archive_iter": dl_manager.iter_archive(
|
120 |
"specs": specs,
|
121 |
"split": "val",
|
122 |
},
|
|
|
90 |
def _split_generators(self, dl_manager):
|
91 |
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
|
92 |
|
93 |
+
JSON_PATH = dl_manager.download_and_extract('merged_train_split_train.jsonl.gz')
|
94 |
+
ARCHIVE_PATH = dl_manager.download('data.tar.bz2')
|
95 |
specs = self._build_specs(JSON_PATH)
|
96 |
return [
|
97 |
datasets.SplitGenerator(
|
98 |
name=datasets.Split.TRAIN,
|
99 |
# These kwargs will be passed to _generate_examples
|
100 |
gen_kwargs={
|
101 |
+
"archive_iter": dl_manager.iter_archive(ARCHIVE_PATH),
|
102 |
"specs": specs,
|
103 |
"split": "train",
|
104 |
},
|
|
|
107 |
name=datasets.Split.TEST,
|
108 |
# These kwargs will be passed to _generate_examples
|
109 |
gen_kwargs={
|
110 |
+
"archive_iter": dl_manager.iter_archive(ARCHIVE_PATH),
|
111 |
"specs": specs,
|
112 |
"split": "test",
|
113 |
},
|
|
|
116 |
name=datasets.Split.VALIDATION,
|
117 |
# These kwargs will be passed to _generate_examples
|
118 |
gen_kwargs={
|
119 |
+
"archive_iter": dl_manager.iter_archive(ARCHIVE_PATH),
|
120 |
"specs": specs,
|
121 |
"split": "val",
|
122 |
},
|