rewrite download section
Browse files
dcase23-task2-enriched.py
CHANGED
@@ -265,7 +265,8 @@ class DCASE2023Task2Dataset(datasets.GeneratorBasedBuilder):
|
|
265 |
audio_path[split]) if not dl_manager.is_streaming else None
|
266 |
if self.config.embeddings_urls is not None:
|
267 |
for emb_name, emb_data in self.config.embeddings_urls.items():
|
268 |
-
|
|
|
269 |
|
270 |
return [
|
271 |
datasets.SplitGenerator(
|
|
|
265 |
audio_path[split]) if not dl_manager.is_streaming else None
|
266 |
if self.config.embeddings_urls is not None:
|
267 |
for emb_name, emb_data in self.config.embeddings_urls.items():
|
268 |
+
downloaded_embeddings = dl_manager.download(emb_data[split])
|
269 |
+
embeddings[split][emb_name] = np.load(downloaded_embeddings, allow_pickle=True)["arr_0"].item()
|
270 |
|
271 |
return [
|
272 |
datasets.SplitGenerator(
|