v0.9.0: Community API and new `push_to_hub` mixins
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.
- ✨ Programmatic API for the community tab by @SBrandeis in #930
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.
- Push to hub mixins that do not leverage
gitby @LysandreJik in #847
Miscellaneous API improvements
- ✨
parent_commitargument forcreate_commitand 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_metadataoption 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
Non-existence of files in a repo is now cached
Progress bars can be globally disabled via the HF_HUB_DISABLE_PROGRESS_BARS env variable or using disable_progress_bars/enable_progress_bars helpers.
Use try_to_load_from_cache to check if a file is locally cached
Documentation updates
- [Doc] Update "Download files from the Hub" doc by @julien-c in #948
- Docs: Fix some missing images and broken links by @NimaBoscarino in #936
- Replace
upload_filewithupload_folderinupload_folderdocstring by @mariosasko in #927 - Clarify upload docs by @stevhliu in #944
Bugfixes & small improvements
- Handle redirections in
hf_hub_downloadfor a renamed repo by @Wauplin in #983 - PR Make
path_in_repooptional inupload folderby @Wauplin in #988 - Use a finer exception when local_files_only=True and a file is missing in cache by @Wauplin in #985
- use fixes JSONDecodeError by @Wauplin in #974
- 🐛 Fix PR creation for a repo the user does not own by @SBrandeis in #922
- login: tiny messaging tweak by @julien-c in #964
- Display endpoint URL in whoami command by @juliensimon in #895
- Small orphaned tweaks from #947 by @julien-c in #958
- FIX LFS track fix for Hub Mixin by @merveenoyan in #919
- 🐛 fix multilinguality test and example by @nateraw in #941
- Fix custom handling of refined HTTPError by @osanseviero in #924
- Followup to #901: Tweak
repocard_types.pyby @julien-c in #931 - [Keras Mixin] - Flattening out nested configurations for better table parsing. by @ariG23498 in #914
- [Keras Mixin] Rendering the Hyperparameter table vertically by @ariG23498 in #917
Internal
- Disable codecov + configure pytest FutureWarnings by @Wauplin in #976
- Enable coverage in CI by @Wauplin in #992
- Enable flake8 on W605 by @Wauplin in #975
- Enable
flake8-bugbear+ adapt existing codebase by @Wauplin in #967 - Test that TensorFlow is not imported on startup by @lhoestq in #904
- Pin black to 22.3.0 to benefit from a stable --preview flag by @LysandreJik in #934
- Update dev version by @gante in #921