huggingface / huggingface_hub

The official Python client for the Huggingface Hub.
https://huggingface.co/docs/huggingface_hub
Apache License 2.0
1.82k stars 470 forks source link

Always Receiving the "resume_download is deprecated error" #2356

Closed AtakanTekparmak closed 5 days ago

AtakanTekparmak commented 6 days ago

Describe the bug

For the last 2 months, in whichever python environment set up, if I have the huggingface-hub and I download a model, I receive the following error whenever I try to use a model from the hub (even if the same model is on device)

Reproduction

No response

Logs

python3.9/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.

System info

Copy-and-paste the text below in your GitHub issue.

- huggingface_hub version: 0.23.2
- Platform: macOS-14.5-arm64-arm-64bit
- Python version: 3.9.13
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /Users/atakantekparmak/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: AtakanTekparmak
- Configured git credential helpers: osxkeychain
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.3.1
- Jinja2: 3.1.4
- Graphviz: N/A
- keras: N/A
- Pydot: N/A
- Pillow: 10.3.0
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 1.26.4
- pydantic: 2.7.1
- aiohttp: 3.9.5
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /Users/atakantekparmak/.cache/huggingface/hub
- HF_ASSETS_CACHE: /Users/atakantekparmak/.cache/huggingface/assets
- HF_TOKEN_PATH: /Users/atakantekparmak/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10
Wauplin commented 6 days ago

Hi @AtakanTekparmak, which versions of huggingface_hub / transformers are you using? This warning should not happen anymore on latest versions (see https://github.com/huggingface/transformers/pull/31007).

albertvillanova commented 6 days ago

Please note that the fix:

was just released yesterday in transformers-4.42.0: https://github.com/huggingface/transformers/releases/tag/v4.42.0

You need to update transformers:

pip install -U transformers
Wauplin commented 5 days ago

Thanks @albertvillanova for the context! My bad then, and happy to know it has been released! :smile: