Repository navigation
Update dependency huggingface-hub to v2 - #16
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==1.33.0→==2.1.1Release Notes
huggingface/huggingface_hub (huggingface-hub)
v2.1.1Compare Source
[CLI] Rename 'hf spaces zero-gpu-quota' to 'hf spaces zero-gpu quota'- #5055
Full Changelog: huggingface/huggingface_hub@v2.1.0...v2.1.1
v2.1.0: [v2.1.0] Better Jobs tooling, ZeroGPU quota tracking, and revamped Model CatalogCompare Source
📊 Jobs: retries, rescheduling, and port exposure
Hugging Face Jobs get a batch of quality-of-life improvements this release. Jobs can now retry automatically on failure with the new
attemptsparameter, and you can start a fresh Job from an existing Job's saved spec (including secrets and hardware settings) withrerun_job/hf jobs rerun. Scheduled Jobs can be rescheduled — change the cron expression or preset without recreating the Job — viaupdate_scheduled_job_schedule/hf jobs scheduled reschedule. Finally, you can now expose ports on Jobs: useexposefor token-protected access andexpose_publicfor unauthenticated access, both at creation time and on a running Job withupdate_job_expose/hf jobs expose.📚 Documentation: Jobs guide
🤗 Track your ZeroGPU quota
The Hub now exposes a ZeroGPU quota endpoint, and
huggingface_hubwraps it with a newHfApi.get_zero_gpu_quota()method returning aZeroGpuQuotadataclass (values in GPU-seconds). This is particularly useful for apps, MCP servers and agents built on top of ZeroGPU Spaces: check how much quota is left and when it resets, and warn your users before they hit the daily limit. The same information is available from the CLI withhf spaces zero-gpu-quota, which also prints a hint to purchase credits when the quota is running low.📚 Documentation: Manage your Space guide
⚡
HfFileSystem.get_filedownloads Xet files withhf_xetHfFileSystem.get_filenow downloads Xet-backed files throughhf_xet(the same code path ashf_hub_download) when writing to a local path, lettinghf_xetwrite directly to disk instead of going through Python. It reuses the Xet hash already returned byinfo()(part of the tree listing), so no extra HTTP call is needed. This mostly benefits non-streamingdatasetsloads fromhf://buckets/...paths: benchmarks on HF Jobs showget_filedropping from ~120s to ~7s on a 2 GB parquet file, andload_dataset("hf://buckets/...")from ~130s to ~17s. The classic HTTP path is still used for non-Xet files, whenhf_xetis not installed, or when writing to a file-like object. As a side effect, a missing remote file no longer leaves an empty local file behind.🧠 Inference Endpoints: Model Catalog migrates to the new v1 API
The catalog methods now use the new
/api/v1/catalogAPI.list_inference_catalogreturnsInferenceCatalogModeldataclasses with their tested deployment recipes (hardware + engine combinations), and takes server-side filters (accelerator,engine,license,task,search,limit).create_inference_endpoint_from_catalogcan deploy an exact recipe with the newrecipe_idandgguf_filearguments. The CLI follows suit:hf endpoints catalog lsprints one row per recipe and supports the filters, whilehf endpoints catalog deploygains--recipeand--gguf-file.📚 Documentation: Inference Endpoints guide
🔒 Sandboxes require scoped credentials
Sandbox security is tightened in this release. Pooled sandboxes with missing, empty or malformed capability tokens are now refused instead of silently substituting the host-management credential, and the client is pinned to
sbx-server0.7.0, which removes host-token acceptance on per-sandbox routes entirely. Older pool hosts that do not provide scoped tokens must be upgraded/recycled: new clients cannot reach legacy hosts and legacy clients cannot reach new sandboxes (documented, accepted breaking change). The sandbox concepts and guides have been updated to describe the strict behavior, including how to safely useproxy_headerswith external HTTP clients (disable redirects!).💔 Breaking Change
🖥️ CLI
hf auth loginwhenhf auth whoamifails by @moon-bot-app[bot] in #5033hf auth whoaminot-logged-in message withhf auth tokenby @Wauplin in #5034hf uploadhelp text by @davanstrien in #5046🔧 Other QoL Improvements
visibilitytocreate_bucketby @hanouticelina in #5053🐛 Bug and typo fixes
📖 Documentation
🏗️ Internal
63ec6f1by @Wauplin in #5010v2.0.0: [v2.0.0] The httpx2 releaseCompare Source
See MIGRATION GUIDE in docs.
💔 Breaking Change: HTTP stack moves to
httpx2See migration plan in #4802 .
huggingface_hubv2.0 replaces its HTTP dependency withhttpx2: clients and transport exceptions now come fromhttpx2/httpcore2instead ofhttpx/httpcore. Custom client factories (viaset_client_factory/set_async_client_factory) and anyexceptclauses catching transport errors must usehttpx2types. For code that must support both v1.x (starting with v1.30.0) and v2.x, import the HTTP module fromhuggingface_hub.utils:Note that
httpx2uses the operating system's certificate trust store by default (custom CA bundles viaSSL_CERT_FILE/SSL_CERT_DIRstill work), logging configuration should target thehttpx2andhttpcore2loggers, and theoauthextra now requiresauthlib>=1.8.0.💔 Breaking Change: deprecated APIs are removed
This release also removes all APIs deprecated in 1.x:
upload_large_folder/HfApi.upload_large_folder→ useupload_folderduplicate_space→ useduplicate_reporequest_space_storage/delete_space_storage→ use the volume APIs (set_space_volumes,delete_space_volumes)repo_type_and_id_from_hf_id→ useparse_hf_uriInferenceEndpointType.PROTECTED→ useAUTHENTICATED(create_inference_endpoint(type="protected")now raisesValueError)list_models(model_name=...)→ uselist_models(search=...)create_repo/duplicate_repo(space_storage=...)→ usespace_volumestext_generation(stop_sequences=...)→ usestopInferenceClient(token=...)→ pass a token string orNoneOn the CLI side, the following entry points and options are gone:
huggingface-cli(usehf),hf repoandhf repo-files delete(usehf reposandhf repos delete-files),hf upload-large-folder(usehf upload),hf repos create/duplicate --storage(use--volume),hf jobs psandhf jobs scheduled ps -f/--filter(use--status/--label), andhf skills add/update --claude(Claude Code installation is now automatic).A migration guide covering all of this is available at https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/concepts/migration_v2.md.
🏗️ Internal
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.