Syoy commited on
Commit
7827b9e
1 Parent(s): affc6ff

rewrite download section

Browse files
Files changed (1) hide show
  1. dcase23-task2-enriched.py +2 -1
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
- embeddings[split][emb_name] = np.load(dl_manager.download(emb_data[split]), allow_pickle=True)["arr_0"].item()
 
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(