Documentation
Version v0.5.0 is the first version which features an API reference. It is still a work in progress with features lacking, some images not rendering, and a documentation reorg coming up, but should already provide significantly simpler access to the huggingface_hub
API.
The documentation is visible here.
- API reference documentation by @LysandreJik in #782
- [API Reference docs] Remove git references from GitHub Action templates by @LysandreJik in #813
- DOC API docstring improvements by @adrinjalali in #731
Model & datasets list improvements
The list_models
and list_datasets
methods have been improved in several ways.
List private models
These two methods now accept the token
keyword to specify your token. Specifying the token will include your private models and datasets in the returned list.
- Support list_models and list_datasets with token arg by @muellerzr in #638
Modelcard metadata
These two methods now accept the cardData
boolean argument. If set to True
, the modelcard metadata will also be returned when using these two methods.
- Include cardData in list_models and list_datasets by @muellerzr in #639
Filtering by carbon emissions
The list_models
method now also accepts an emissions_trehsholds
parameter to filter by carbon emissions.
- Enable filtering by carbon emission by @muellerzr in #668
Keras improvements
The Keras serialization and upload methods have been worked on to provide better support for models:
- All parameters are now included in the saved model when using
push_to_hub_keras
log_dir
parameter for TensorBoard logs, which will automatically spawn a TensorBoard instance on the Hub.- Automatic model card
- Introduce
include_optimizer
parameter topush_to_hub_keras()
by @merveenoyan in #616 - Add TensorBoard for Keras models by @merveenoyan in #651
- Create Automatic Keras model card by @merveenoyan in #679
- Allow TensorBoard Override for same Repository by @merveenoyan in #709
- Add tempfile for tensorboard logs in tensorboard tests in
test_keras_integration.py
by @merveenoyan in #761
Contributing guide
A contributing guide is now available for the huggingface_hub
repository. For any and all information related to contributing to the repository, please check it out!
Read more about it here: CONTRIBUTING.md.
Pre-commit hooks
The huggingface_hub
GitHub repository has several checks to ensure that the code respects code quality standards. Opt-in pre-commit hooks have been added in order to make it simpler for contributors to leverage them.
Read more about it in the aforementionned CONTRIBUTING guide.
- MNT Add pre-commit hooks by @adrinjalali in #807
Renaming and transferring repositories
Repositories can now be renamed and transferred programmatically using move_repo
.
- Allow renaming and transferring repos programmatically by @osanseviero in #704
Breaking changes & deprecation
⛔ The following methods have now been removed following a deprecation cycle
list_repos_objs
The list_repos_objs
and the accompanying CLI utility huggingface-cli repo ls-files
have been removed.
The same can be done using the model_info
and dataset_info
methods.
Python 3.6
Python 3.6 support is now dropped as end of life. Using Python 3.6 and installing huggingface_hub
will result in version v0.4.0 being installed.
- CI support python 3.7-3.10 - remove 3.6 support by @adrinjalali in #790
⚠️ Items below are now deprecated and will be removed in a future version
- API deprecate positional args in file_download and hf_api by @adrinjalali in #745
- MNT deprecate name and organization in favor of repo_id by @adrinjalali in #733
What's Changed
- Include "model" in repo_type to keep consistency by @muellerzr in #620
- Hotfix for repo_type by @muellerzr in #623
- fix: typo in docstring by @ariG23498 in #647
- {upload|delete}_file: Remove client-side filename validation by @SBrandeis in #669
- Ensure
post_method
is only executed once by @sgugger in #676 - Remove paying subscription mention from docstring by @cakiki in #653
- Improve tests and logging by @muellerzr in #682
- docs(links): Update
settings/token
tosettings/tokens
by @ronvoluted in #699 - Add support for private hub by @juliensimon in #703
- Add retry_endpoint for test stability by @osanseviero in #719
- FIX fix a bug in _filter_emissions to accept numbers w/o decimal and dict emissions by @adrinjalali in #753
- Logging fix for
hf_api
, logging documentation by @LysandreJik in #748 - Contributing guide & code of conduct by @LysandreJik in #692
- Fix pytorch and tensorflow python matrix by @osanseviero in #760
- MNT add links to related projects and the forum on issue template by @adrinjalali in #773
- Note on the README by @LysandreJik in #772
- Remove autoreviewers by @muellerzr in #793
- CI Error on FutureWarning by @adrinjalali in #787
- MNT more informative message on error in
Hf.Api.delete_repo
by @adrinjalali in #783 - Add security status by @McPatate in #654
- Remove redundant part of security test by @osanseviero in #802
- Changed test repository names to fix tests by @merveenoyan in #803
- TST calling delete_repo under tempfile for fixing the test by @merveenoyan in #804
- Disable logging in with organization token by @merveenoyan in #780
- MNT change dev version to 0.5, 0.4 is already released by @adrinjalali in #810
- 👨💻 Configure HF Hub URL with environment variable by @SBrandeis in #815
- MNT support oder requests versions by @adrinjalali in #817
- Rename the env variable
HF_ENDPOINT
. by @Narsil in #819
New Contributors
- @McPatate made their first contribution in #583
- @FremyCompany made their first contribution in #606
- @simoninithomas made their first contribution in #633
- @mlonaws made their first contribution in #630
- @ariG23498 made their first contribution in #647
- @J-Petiot made their first contribution in #660
- @ronvoluted made their first contribution in #699
- @juliensimon made their first contribution in #703
- @allendorf made their first contribution in #742
- @frgfm made their first contribution in #747
- @hbredin made their first contribution in #688
Full Changelog: v0.4.0...v0.5.0