Huggingface-hub

Latest version: v0.26.2

Safety actively analyzes 682416 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 16

0.9.1

Not secure
Hot-fix error message on gated repositories (https://github.com/huggingface/huggingface_hub/pull/1015).

Context: https://huggingface.co/CompVis/stable-diffusion-v1-4 has been widely shared in the last days but since it's a gated-repo, lots of users are getting confused by the Authentification error received. Error message is now more detailed.

**Full Changelog**: https://github.com/huggingface/huggingface_hub/compare/v0.9.0...v0.9.1

0.9.0

Not secure
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](https://huggingface.co/docs/huggingface_hub/how-to-discussions-and-pull-requests) 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 `git` by LysandreJik in 847

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
* Add utility to load files from cache by sgugger in 980

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_file` with `upload_folder` in `upload_folder` docstring by mariosasko in 927
* Clarify upload docs by stevhliu in 944

Bugfixes & small improvements
* Handle redirections in `hf_hub_download` for a renamed repo by Wauplin in 983
* PR Make `path_in_repo` optional in `upload folder` by 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
* :bug: 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.py` by 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

0.8.1

Not secure
Git-aware cache file layout

v0.8.1 introduces a new way of caching files from the Hugging Face Hub, to two methods: `snapshot_download` and `hf_hub_download`.
The new approach is extensively documented in the [Documenting files](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/file_download#caching) guide and we recommend checking it out to get a better understanding of how caching works.

* New git-aware cache file layout by julien-c in 801

New `create_commit` API

A new `create_commit` API allows users to upload and delete several files at once using HTTP-based methods. You can read more about it in [this guide](https://huggingface.co/docs/huggingface_hub/how-to-upstream#managing-files-in-a-repo-without-git-with-the-createcommit-api). The following convenience methods were also introduced:
* `upload_folder`: Allows uploading a local directory to a repo.
* `delete_file` allows deleting a single file from a repo.

`upload_file` now uses `create_commit` under the hood.

`create_commit` also allows creating pull requests with a `create_pr=True` flag.

None of the methods rely on Git locally.

* New `create_commit` API by SBrandeis in 888

Lazy loading

All modules will now be lazy-loaded. This should drastically reduce the time it takes to import `huggingface_hub` as it will no longer load all soft dependencies.

* ENH lazy load modules in the root __init__ by adrinjalali in 874

Improvements and bugfixes

* Add request ID to all requests by LysandreJik in 909
* Remove deprecations by LysandreJik in 910
* FIX Avoid creating repository when it exists on remote by merveenoyan in 900
* 🏗 Use `hub-ci` for tests by SBrandeis in 898
* Refine 404 errors by LysandreJik in 878
* Fix typo by lsb in 902
* FIX `metadata_update`: work on a copy of the upstream file, to not mess up the cache by julien-c in 891
* ENH Removed history writing in Keras model card by merveenoyan in 876
* CI enable codecov by adrinjalali in 893
* MNT deprecate imports from snapshot_download by adrinjalali in 880
* Pushback deprecation for v0.7 release by LysandreJik in 882
* FIX make import machinary private by adrinjalali in 879
* ENH Keras Use table instead of dictionary for hyperparameters in model card by merveenoyan in 877
* Invert deprecation for create_repo in 912
* Constant was accidentally removed during deprecation transition in 913

0.7.0

Not secure
Repocard metadata

This PR adds a metadata_update function that allows the user to update the metadata in a repository on the hub. The function accepts a dict with metadata (following the same pattern as the YAML in the README) and behaves as follows for all top level fields except model-index.

Examples:

Starting from


existing_results = [{
'dataset': {'name': 'IMDb', 'type': 'imdb'},
'metrics': [{'name': 'Accuracy', 'type': 'accuracy', 'value': 0.995}],
'task': {'name': 'Text Classification', 'type': 'text-classification'}
}]


1. Overwrite existing metric value in existing result
py
new_results = deepcopy(existing_results)

0.6.0

Not secure
*Disclaimer*: This release was initially released with advertised support for 844. It was not released in this release and will be in v0.7.

fastai support

v0.6.0 introduces downstream (download) and upstream (upload) support for the fastai libraries. It supports fastai versions above 2.4.
The integration is detailed in the following [blog](https://huggingface.co/blog/fastai).

* Add fastai upstream and downstream capacities for fastai>=2.4 and fastcore>=1.3.27 versions by omarespejel in 678

Automatic binary file tracking in `Repository`

Binary files are now rejected by default by the Hub. v0.6.0 introduces automatic binary file tracking through the `auto_lfs_track` argument of the `Repository.git_add` method. It also introduces the `Repository.auto_track_binary_files` method which can be used independently of other methods.

* ENH Auto track binary files in Repository by LysandreJik in 828

`skip_lfs_file` is now added to mixins

The parameter `skip_lfs_files` is now added to the different mixins. This will enable pushing files to the hub without first downloading the files above 10MB. This should drammatically reduce the time needed when updating a modelcard, a configuration file, and others.

* :sparkles: add skip_lfs_files to mixins' push_to_hub by nateraw in 858

Keras support improvement

The support for Keras model is greatly improved through several additions:

- The `save_pretrained_keras` method now accepts a list of tags that will automatically be added to the repository.
- Download statistics are now available on Keras models

* Introducing list of tags to Keras model card by merveenoyan in 806
* Enable keras download stats by merveenoyan in 860

Bugfixes and improvements

* FIX don't raise if name/organizaiton are passed postionally by adrinjalali in 822
* ENH Use provided token from HUGGING_FACE_HUB_TOKEN env variable if available by FrancescoSaverioZuppichini in 794
* tests(hf_api): remove infectionTypes field by McPatate in 834
* Remove docs, tasks and inference API from huggingface_hub by osanseviero in 833
* FEAT Uniformize `hf_api` a bit and add support for Spaces by julien-c in 792
* Add a bug report template by osanseviero in 832
* clean up formatting by stevhliu in 839
* Release guide by LysandreJik in 820
* Fix keras test by osanseviero in 855
* DOC Add quick start guide by stevhliu in 850
* MNT refactor: subprocess.run -> run_subprocess by LysandreJik in 352
* MNT enable preview on black by adrinjalali in 849
* Update how to guides by stevhliu in 840
* Update contribution guide for merging PRs by stevhliu in 856
* DOC Update landing page by stevhliu in 854
* space after uri by leondz in 866

0.5.1

Not secure
This is a patch release fixing a breaking backward compatibility issue.

Linked PR: https://github.com/huggingface/huggingface_hub/pull/822

Page 11 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.