Syoy commited on
Commit
6d0378c
1 Parent(s): 5b1a6d7

fix bug when streaming

Browse files
Files changed (1) hide show
  1. dcase23-task2-enriched.py +1 -1
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()