Git-aware cache file layout
v0.8.1 introduces a new way of caching files from the Hugging Face Hub, to two methods: snapshot_download
and hf_hub_download
.
The new approach is extensively documented in the Documenting files guide and we recommend checking it out to get a better understanding of how caching works.
New create_commit
API
A new create_commit
API allows users to upload and delete several files at once using HTTP-based methods. You can read more about it in this guide. The following convenience methods were also introduced:
upload_folder
: Allows uploading a local directory to a repo.delete_file
allows deleting a single file from a repo.
upload_file
now uses create_commit
under the hood.
create_commit
also allows creating pull requests with a create_pr=True
flag.
None of the methods rely on Git locally.
- New
create_commit
API by @SBrandeis in #888
Lazy loading
All modules will now be lazy-loaded. This should drastically reduce the time it takes to import huggingface_hub
as it will no longer load all soft dependencies.
- ENH lazy load modules in the root init by @adrinjalali in #874
Improvements and bugfixes
- Add request ID to all requests by @LysandreJik in #909
- Remove deprecations by @LysandreJik in #910
- FIX Avoid creating repository when it exists on remote by @merveenoyan in #900
- 🏗 Use
hub-ci
for tests by @SBrandeis in #898 - Refine 404 errors by @LysandreJik in #878
- Fix typo by @lsb in #902
- FIX
metadata_update
: work on a copy of the upstream file, to not mess up the cache by @julien-c in #891 - ENH Removed history writing in Keras model card by @merveenoyan in #876
- CI enable codecov by @adrinjalali in #893
- MNT deprecate imports from snapshot_download by @adrinjalali in #880
- Pushback deprecation for v0.7 release by @LysandreJik in #882
- FIX make import machinary private by @adrinjalali in #879
- ENH Keras Use table instead of dictionary for hyperparameters in model card by @merveenoyan in #877
- Invert deprecation for create_repo in #912
- Constant was accidentally removed during deprecation transition in #913