fix bug when streaming
Browse files
dcase23-task2-enriched.py
CHANGED
@@ -395,7 +395,7 @@ class DCASE2023Task2Dataset(datasets.GeneratorBasedBuilder):
|
|
395 |
audio_path[split] = dl_manager.download(self.config.data_urls[split])
|
396 |
local_extracted_archive[split] = dl_manager.extract(
|
397 |
audio_path[split]) if not dl_manager.is_streaming else None
|
398 |
-
if self.config.embeddings_urls is not None:
|
399 |
for emb_name, emb_data in self.config.embeddings_urls.items():
|
400 |
downloaded_embeddings = dl_manager.download(emb_data[split])
|
401 |
embeddings[split][emb_name] = np.load(downloaded_embeddings, allow_pickle=True)["arr_0"].item()
|
|
|
395 |
audio_path[split] = dl_manager.download(self.config.data_urls[split])
|
396 |
local_extracted_archive[split] = dl_manager.extract(
|
397 |
audio_path[split]) if not dl_manager.is_streaming else None
|
398 |
+
if self.config.embeddings_urls is not None and not dl_manager.is_streaming:
|
399 |
for emb_name, emb_data in self.config.embeddings_urls.items():
|
400 |
downloaded_embeddings = dl_manager.download(emb_data[split])
|
401 |
embeddings[split][emb_name] = np.load(downloaded_embeddings, allow_pickle=True)["arr_0"].item()
|