asteroid-team / asteroid

The PyTorch-based audio source separation toolkit for researchers
https://asteroid-team.github.io/
MIT License
2.21k stars 419 forks source link

Warning cached_download deprecated #644

Closed mattiadg closed 1 year ago

mattiadg commented 1 year ago

Hi, this is my first issue here so I hope I report correctly enough. Before starting, I would like to give you my congrats for the amazing work done here.

The issue is just a warning, but it may be better to get rid of this stuff before it becomes problematic

Before reporting a bug:

First, please search previous issues and the FAQ and be sure this hasn't been answered elsewhere.

🐛 Bug

using cached_download raises a warning:

huggingface_hub/file_download.py:588: FutureWarning: `cached_download` is the legacy way to download files from the HF hub, please consider upgrading to `hf_hub_download`

To Reproduce

BaseModel.from_pretrained(model_path)

where model_path is a path that doesn't exist locally.

Expected behavior

Warning message:

huggingface_hub/file_download.py:588: FutureWarning: `cached_download` is the legacy way to download files from the HF hub, please consider upgrading to `hf_hub_download`

Environment

Package versions

I have 0.5.3 but the same function is still used in the main branch

Additional info

mpariente commented 1 year ago

Hello @mattiadg,

Great first issue, thank you very much !

Would you like to submit a pull request that fixes this ?

mattiadg commented 1 year ago

Sure, I can do it