huggingface / huggingface_hub

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

Downloads of `snapshot_download` are not counted in the model card #2007

Closed LZHgrla closed 9 months ago

LZHgrla commented 9 months ago

Describe the bug

I found that using snapshot_download does not count towards the downloads count. An example repository is https://huggingface.co/xtuner/llava-internlm2-7b

Reproduction

No response

Logs

No response

System info

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

- huggingface_hub version: 0.19.4
- Platform: Linux-3.10.0-957.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.13
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /mnt/petrelfs/linzhihao/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: LZHgrla
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.2
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 10.1.0
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 1.26.2
- pydantic: 2.5.2
- aiohttp: 3.9.1
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /mnt/petrelfs/linzhihao/.cache/huggingface/hub
- HF_ASSETS_CACHE: /mnt/petrelfs/linzhihao/.cache/huggingface/assets
- HF_TOKEN_PATH: /mnt/petrelfs/linzhihao/.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
osanseviero commented 9 months ago

Hi there! As per the Model Stats docs, downloads are counted in a specific index file, such as config.json. I recommend reading the docs. From a quick look at your repo, it's not downloading a default download file and has a different directory structure, which would explain the lack of download stats.

LZHgrla commented 9 months ago

Thanks!