What's Changed
Version v0.1.0 is the first minor release of the `huggingface_hub` package, which promises better stability for the incoming versions. This update comes with big quality of life improvements.
Make token optional in all HfApi methods. by sgugger in https://github.com/huggingface/huggingface_hub/pull/379
Previously, most methods of the `HfApi` class required the token to be explicitly passed. This is changed in this version, where it defaults to the token stored in the cache. This results in a re-ordering of arguments, but backward compatibility is preserved in most cases. Where it is not preserved, an explicit error is thrown.
Root methods instead of `HfApi` by LysandreJik in https://github.com/huggingface/huggingface_hub/pull/388
The `HfApi` class now exposes its methods through the `hf_api` file, reducing the friction to access these helpers. See the example below:
py
Previously
from huggingface_hub import HfApi
api = HfApi()
user = api.whoami()
Now
from huggingface_hub.hf_api import whoami
user = whoami()
The `HfApi` can still be imported and works as before for backward compatibility.
Add `list_repo_files` util by sgugger in https://github.com/huggingface/huggingface_hub/pull/395
Offers a `list_repo_files` to ... list the repo files! Supports both model repositories and dataset repositories
Add helper to generate an eval result `model-index`, with proper typing by julien-c in https://github.com/huggingface/huggingface_hub/pull/382
Offers a `metadata_eval_result` in order to generate a YAML block to put in model cards according to evaluation results.
Add metrics to API by mariosasko in https://github.com/huggingface/huggingface_hub/pull/429
Adds a list_metrics method to HfApi!
Git prune by LysandreJik in https://github.com/huggingface/huggingface_hub/pull/450
Adds a `git_prune` method to the `Repository` class. This prunes local files which are unneeded as already pushed to a remote.
It adds the argument `auto_lfs_prune` to `git_push` and the `commit` context-manager for simpler handling.
Bug fixes
* Fix HfApi.create_repo when repo_type is 'space' by nateraw in https://github.com/huggingface/huggingface_hub/pull/394
* Last fixes for `datasets`' `push_to_hub` method by LysandreJik in https://github.com/huggingface/huggingface_hub/pull/415
**Full Changelog**: https://github.com/huggingface/huggingface_hub/compare/v0.0.19...v0.1.0