Skip to content

Commit

Permalink
Add: Check for url==None to avoid try to download unavailable AC subset.
Browse files Browse the repository at this point in the history
  • Loading branch information
Labbeti committed Jul 17, 2023
1 parent 27cb8bb commit f31067a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aac_datasets/datasets/audiocaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@ def _prepare_audiocaps_dataset(

if not osp.isfile(captions_fpath):
url = links["captions"]["url"]
if url is None:
raise ValueError(
f"AudioCaps subset '{subset}' cannot be automatically downloaded. (found url={url})"
)
download_url_to_file(url, captions_fpath, progress=verbose >= 1)

start = time.perf_counter()
Expand Down

0 comments on commit f31067a

Please sign in to comment.