pypi huggingface-hub 0.9.0
v0.9.0: Community API and new `push_to_hub` mixins

latest releases: 0.25.0, 0.25.0rc1, 0.25.0rc0...
2 years ago

Community API

Huge work to programmatically interact with the community tab, thanks to @SBrandeis !
It is now possible to:

  • Manage discussions (create_discussion, create_pull_request, merge_pull_request, change_discussion_status, rename_discussion)
  • Comment on them (comment_discussion, edit_discussion_comment)
  • List them (get_repo_discussions, get_discussion_details)

See full documentation for more details.

HTTP-based push_to_hub mixins

push_to_hub mixin and push_to_hub_keras have been refactored to leverage the http-endpoint. This means pushing to the hub will no longer require to first download the repo locally. Previous git-based version is planned to be supported until v0.12.

Miscellaneous API improvements

  • parent_commit argument for create_commit and related functions by @SBrandeis in #916
  • Add a helpful error message when commit_message is empty in create_commit by @sgugger in #962
  • ✨ create_commit: more user-friendly errors on HTTP 400 by @SBrandeis in #963
  • ✨ Add files_metadata option to repo_info by @SBrandeis in #951
  • Add list_spaces to HfApi by @cakiki in #889

Miscellaneous helpers (advanced)

Filter which files to upload in upload_folder

  • Allowlist and denylist when uploading a folder by @Wauplin in #994

Non-existence of files in a repo is now cached

  • Cache non-existence of files or completeness of repo by @sgugger in #986

Progress bars can be globally disabled via the HF_HUB_DISABLE_PROGRESS_BARS env variable or using disable_progress_bars/enable_progress_bars helpers.

  • Add helpers to disable progress bars globally + tests by @Wauplin in #987

Use try_to_load_from_cache to check if a file is locally cached

Documentation updates

Bugfixes & small improvements

Internal

Don't miss a new huggingface-hub release

NewReleases is sending notifications on new releases.