Tag listing
* Introduce Tag Listing by muellerzr in https://github.com/huggingface/huggingface_hub/pull/537
This PR introduces the ability to fetch all available tags for models or datasets and returns them as a nested namespace object, for example:
py
>>> from huggingface_hub import HfApi
>>> api = HfApi()
>>> tags = api.get_model_tags()
>>> print(tags)
Available Attributes:
* benchmark
* language_creators
* languages
* licenses
* multilinguality
* size_categories
* task_categories
* task_ids
>>> print(tags.benchmark)
Available Attributes:
* raft
* superb
* test
Namespace objects
* Namespace Objects for Search Parameters by muellerzr in https://github.com/huggingface/huggingface_hub/pull/556
With a goal of adding more tab-completion to the library, this PR introduces two objects:
- `DatasetSearchArguments`
- `ModelSearchArguments`
These two `AttributeDictionary` objects contain all the valid information we can extract from a model as tab-complete parameters. We also include the `author_or_organization` and `dataset` (or `model`) `_name` as well through careful string splitting.
Model Filter
* Implement a Model Filter class by muellerzr in https://github.com/huggingface/huggingface_hub/pull/553
This PR introduces a new way to search the hub: the `ModelFilter` class.
It is a simple Enum at first to the user, allowing them to specify what they want to search for, such as:
python
f = ModelFilter(author="microsoft", model_name="wavlm-base-sd", framework="pytorch")
From there, they can pass in this filter to the new `list_models_by_filter` function in `HfApi` to search through it:
python
models = api.list_modes(filter=f)
The API may then be used for complex queries:
py
args = ModelSearchArguments()
f = ModelFilter(framework=[args.library.pytorch, args.library.TensorFlow], model_name="bert", tasks=[args.pipeline_tag.Summarization, args.pipeline_tag.TokenClassification])
api.list_models_from_filter(f)
Ignoring filenames in snapshot_download
This PR introduces a way to limit the files that will be fetched by the `snapshot_download`. This is useful when you want to download and cache an entire repository without using git, and that you want to skip files according to their filenames.
* [Snapshot download] allow some filenames to be ignored by patrickvonplaten in https://github.com/huggingface/huggingface_hub/pull/566
What's Changed
* [Hotfix][API] card_data => cardData on /api/datasets by julien-c in https://github.com/huggingface/huggingface_hub/pull/530
* Fix the progress bars when cloning a repository by LysandreJik in https://github.com/huggingface/huggingface_hub/pull/517
* Update Hugging Face Hub documentation README and Endpoints by muellerzr in https://github.com/huggingface/huggingface_hub/pull/527
* Convert string functions to f-string by muellerzr in https://github.com/huggingface/huggingface_hub/pull/536
* Fixing FS for `espnet`. by Narsil in https://github.com/huggingface/huggingface_hub/pull/542
* [snapshot_download] upgrade to canonical separator by julien-c in https://github.com/huggingface/huggingface_hub/pull/545
* Add test directions by muellerzr in https://github.com/huggingface/huggingface_hub/pull/547
* [HOTFIX] Change test for missing_input to reflect back-end redirect changes by muellerzr in https://github.com/huggingface/huggingface_hub/pull/552
* Bring consistency to download and upload APIs by muellerzr in https://github.com/huggingface/huggingface_hub/pull/574
* Search by authors and string by FrancescoSaverioZuppichini in https://github.com/huggingface/huggingface_hub/pull/531
* Quick typo by muellerzr in https://github.com/huggingface/huggingface_hub/pull/575
New Contributors
* kahne made their first contribution in https://github.com/huggingface/huggingface_hub/pull/569
* FrancescoSaverioZuppichini made their first contribution in https://github.com/huggingface/huggingface_hub/pull/531
**Full Changelog**: https://github.com/huggingface/huggingface_hub/compare/v0.2.1...v0.4.0