huggingface-hub 1.0.0rc1__py3-none-any.whl → 1.0.0rc2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of huggingface-hub might be problematic. Click here for more details.

Files changed (34) hide show
  1. huggingface_hub/__init__.py +1 -1
  2. huggingface_hub/_commit_api.py +126 -66
  3. huggingface_hub/_commit_scheduler.py +4 -7
  4. huggingface_hub/_login.py +9 -15
  5. huggingface_hub/_tensorboard_logger.py +2 -5
  6. huggingface_hub/_webhooks_server.py +8 -20
  7. huggingface_hub/cli/repo.py +137 -5
  8. huggingface_hub/dataclasses.py +3 -12
  9. huggingface_hub/fastai_utils.py +22 -32
  10. huggingface_hub/file_download.py +18 -21
  11. huggingface_hub/hf_api.py +258 -410
  12. huggingface_hub/hf_file_system.py +17 -44
  13. huggingface_hub/inference/_client.py +25 -47
  14. huggingface_hub/inference/_generated/_async_client.py +25 -47
  15. huggingface_hub/inference/_mcp/agent.py +2 -5
  16. huggingface_hub/inference/_mcp/mcp_client.py +2 -5
  17. huggingface_hub/inference/_providers/__init__.py +11 -0
  18. huggingface_hub/inference/_providers/_common.py +1 -0
  19. huggingface_hub/inference/_providers/publicai.py +6 -0
  20. huggingface_hub/inference/_providers/scaleway.py +28 -0
  21. huggingface_hub/lfs.py +14 -8
  22. huggingface_hub/repocard.py +12 -16
  23. huggingface_hub/serialization/_base.py +3 -6
  24. huggingface_hub/serialization/_torch.py +16 -34
  25. huggingface_hub/utils/_cache_manager.py +41 -71
  26. huggingface_hub/utils/_chunk_utils.py +2 -3
  27. huggingface_hub/utils/_http.py +27 -30
  28. huggingface_hub/utils/logging.py +8 -11
  29. {huggingface_hub-1.0.0rc1.dist-info → huggingface_hub-1.0.0rc2.dist-info}/METADATA +2 -2
  30. {huggingface_hub-1.0.0rc1.dist-info → huggingface_hub-1.0.0rc2.dist-info}/RECORD +34 -32
  31. {huggingface_hub-1.0.0rc1.dist-info → huggingface_hub-1.0.0rc2.dist-info}/LICENSE +0 -0
  32. {huggingface_hub-1.0.0rc1.dist-info → huggingface_hub-1.0.0rc2.dist-info}/WHEEL +0 -0
  33. {huggingface_hub-1.0.0rc1.dist-info → huggingface_hub-1.0.0rc2.dist-info}/entry_points.txt +0 -0
  34. {huggingface_hub-1.0.0rc1.dist-info → huggingface_hub-1.0.0rc2.dist-info}/top_level.txt +0 -0
@@ -191,26 +191,23 @@ def hf_hub_url(
191
191
  'https://huggingface.co/julien-c/EsperBERTo-small/resolve/main/pytorch_model.bin'
192
192
  ```
193
193
 
194
- <Tip>
195
-
196
- Notes:
197
-
198
- Cloudfront is replicated over the globe so downloads are way faster for
199
- the end user (and it also lowers our bandwidth costs).
200
-
201
- Cloudfront aggressively caches files by default (default TTL is 24
202
- hours), however this is not an issue here because we implement a
203
- git-based versioning system on huggingface.co, which means that we store
204
- the files on S3/Cloudfront in a content-addressable way (i.e., the file
205
- name is its hash). Using content-addressable filenames means cache can't
206
- ever be stale.
207
-
208
- In terms of client-side caching from this library, we base our caching
209
- on the objects' entity tag (`ETag`), which is an identifier of a
210
- specific version of a resource [1]_. An object's ETag is: its git-sha1
211
- if stored in git, or its sha256 if stored in git-lfs.
212
-
213
- </Tip>
194
+ > [!TIP]
195
+ > Notes:
196
+ >
197
+ > Cloudfront is replicated over the globe so downloads are way faster for
198
+ > the end user (and it also lowers our bandwidth costs).
199
+ >
200
+ > Cloudfront aggressively caches files by default (default TTL is 24
201
+ > hours), however this is not an issue here because we implement a
202
+ > git-based versioning system on huggingface.co, which means that we store
203
+ > the files on S3/Cloudfront in a content-addressable way (i.e., the file
204
+ > name is its hash). Using content-addressable filenames means cache can't
205
+ > ever be stale.
206
+ >
207
+ > In terms of client-side caching from this library, we base our caching
208
+ > on the objects' entity tag (`ETag`), which is an identifier of a
209
+ > specific version of a resource [1]_. An object's ETag is: its git-sha1
210
+ > if stored in git, or its sha256 if stored in git-lfs.
214
211
 
215
212
  References:
216
213
 
@@ -243,7 +240,7 @@ def _httpx_follow_relative_redirects(method: HTTP_METHOD_T, url: str, **httpx_kw
243
240
 
244
241
  This is useful to follow a redirection to a renamed repository without following redirection to a CDN.
245
242
 
246
- A backoff mechanism retries the HTTP call on 429, 503 and 504 errors.
243
+ A backoff mechanism retries the HTTP call on 5xx errors and network errors.
247
244
 
248
245
  Args:
249
246
  method (`str`):