Repository navigation
fix(deps): update dependency huggingface-hub to v2 - #345
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
Author
|
Contributor
|
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 |
renovate
Bot
force-pushed
the
renovate/huggingface-hub-2.x
branch
from
October 8, 2026 16:06
3a758d4 to
2af6ed2
Compare
renovate
Bot
force-pushed
the
renovate/huggingface-hub-2.x
branch
from
October 23, 2026 10:44
2af6ed2 to
60f6963
Compare
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.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
==1.28.0→==2.3.0Release Notes
huggingface/huggingface_hub (huggingface-hub)
v2.3.0: [v2.3.0] Bucket live-follow, fasterHfFileSystemlistings and moreCompare Source
🔄 Keep Bucket listings fresh with
live_follow=TrueHfFileSystemcaches directory listings, so files added to a Bucket by another process did not show up until you calledinvalidate_cache(). Withlive_follow=True,HfFileSystemopens one background connection per listed Bucket to receive its file changes from the Hub. When a change arrives, it removes the cached listings it affects.It also works through fsspec with
fsspec.filesystem("hf", live_follow=True), and through thestorage_optionsargument of libraries such as pandas and pyarrow. The option is off by default because it keeps a connection open for each followed Bucket. It only affects listings and metadata (ls,info,exists,glob, ...), because reading a file always fetches its content from the Hub. It is not available for model, dataset and Space repos: userefresh=Trueto see a new commit.🚀
HfFileSystemlists large repos in parallelRecursive listings such as
findandglobused to be slow on large repos. The Hub returns a repo's file tree 1000 entries at a time, and each page can only be requested after the previous one has arrived. Listingdatasets/allenai/objaverse(~800k files) took ~800 requests in a row, about 13 minutes.HfFileSystemnow splits recursive listings by sub-directory and lists them in parallel, with almost the same number of requests. A sub-tree that fits in a single page is never split.maxdepthis now applied during the listing, so the Hub only returns the levels you ask for.datasets/allenai/objaversefind(), 798,924 filesfind(maxdepth=2), 328 entriesThe new
max_workersargument ofHfFileSystemsets the number of concurrent requests. It defaults to 16. Set it to 1 to list sequentially like before.📎 Attach images and videos to discussions and PRs
The new
HfApi.upload_attachment(path)uploads an image, video or audio file and returns its URL, which you can embed in a discussion, PR description or comment. Before, this required calling an undocumented Hub endpoint by hand.On the CLI,
hf discussions create(including--pr),commentandedittake a repeatable--attach FILE[#alt text]option. If the body already references the file as, that reference is replaced with the uploaded URL. Other files are added at the end of the body, the same way the Hub web editor does it.upload_attachmentand--attachfor media files by @hanouticelina in #5161🧩 Read every safetensors shard header in one request
get_safetensors_metadatareads the header of each shard of a sharded model separately. The newget_sharded_safetensors_metadatagets all of them from the Hub in a single request and returns the sameSafetensorsRepoMetadata. It only reads themainrevision.get_safetensors_metadatais unchanged.get_sharded_safetensors_metadatato get every shard header in one request by @mishig25 in #5159🔒 Access requests on gated repos that hide requester identity
Owners of gated repos can now choose not to share the username and/or email of the people requesting access. On those repos,
list_pending_access_requests(and the accepted and rejected variants) failed with aKeyError. EachAccessRequestnow has arequest_id, andaccept_access_request,reject_access_requestandcancel_access_requestacceptrequest_id=instead ofuser.🛡️
create_commitno longer deletes files you re-add in the same commitcreate_commitskips adds and copies whose content is already on the Hub. When the same commit also deleted that path or its parent folder, only the delete was sent, and the file was removed from the repo without any error. This affected deleting a folder and pushing the same files back in one commit, and had been happening since v0.24. Those adds are now kept.💼
hf jobs runkeeps streaming logs and shows queue statushf jobs runstopped printing logs when the log stream ended before the Job did, and crashed after a few dropped connections. It now reconnects until the Job reaches a final stage. Ctrl+C used to stop the logs while the CLI kept waiting silently for the Job to end. It now exits right away and tells you that the Job is still running and how to follow or cancel it.While a Job waits for hardware,
hf jobs run,hf jobs uv runandhf jobs rerunprinted nothing, so a queued Job looked like a stuck CLI. They now show the Hub's status message and how long the Job has been waiting, in interactive terminals only:🐍 Python 3.15 support
huggingface_hubnow officially supports Python 3.15 and is tested on it in CI. No code changes were needed. Python 3.10 is still the minimum version.🤖 Inference
InferenceClientkept every non-streaming response in memory untilclose(). With 30 calls and a 1 MB prompt, that was 30 MB.timeoutnow raisesInferenceTimeoutErroras documented, instead of the raw httpx timeout error.🖥️ CLI
hf cache lsby @hanouticelina in #5148. Files left behind when an olderhuggingface_hubversion deletes a repo now show up as a hint pointing tohf cache prune.🔧 Other QoL improvements
🐛 Bug and typo fixes
HfApi(endpoint=...), 20 methods (webhooks, access requests, user and org info, followers, members) were sent to huggingface.co with the instance's token. Setups usingHF_ENDPOINTwere not affected.find()andglob()could silently skip folders such asimages-arnext toimages.Dataset.push_to_hub("buckets/...")into a new bucket failed withFileNotFoundErrorafter uploading the data files.HF_HUB_OFFLINE=1,hf_hub_downloadat a pinned commit could delete the existing file inlocal_dirinstead of returning it.UnicodeDecodeErrorwhen the process runs with the C locale, which broke checkpoint saving in TRL.metadata_updateon a README saved with a BOM added a second metadata block, and the Hub lost the original metadata.📖 Documentation
🏗️ Internal
sourcein live dataset leaderboard test by @moon-bot-app[bot] in #5221v2.2.0: [v2.2.0]hf jobs statssnapshots, download andHfFileSystemfixesCompare Source
A small release this week, mostly bug fixes and quality-of-life improvements.
hf jobs statsnow returns right away instead of streaming forever, concurrent downloads reliably usehf_xet, andHfFileSystemcaching is more predictable. Two behavior changes are listed under Breaking changes.📊
hf jobs statsprints a snapshot by defaulthf jobs statsused to stream metrics until the job finished, so scripts and agents calling it on a running job hung until their own timeout. It now prints the latest sample of each job once and exits, likehf jobs logsandhf spaces logs. Use-f/--followfor the previous live view. Snapshot output also supports--format json|agent|quiet, which outputs the raw API metrics.On the Python side,
HfApi.fetch_job_metricsgets the samefollowparameter asfetch_job_logs. It defaults toFalseand returns only the current sample. Passfollow=Trueto stream until the job completes.Other Jobs fixes in this release:
hf jobs logsandhf spaces logswithout-fno longer hang while the job keeps printing,hf jobs statsno longer fails when one of the requested jobs has finished, andhf jobs stats --jsonprints[]when no job is running.📚 Documentation: Jobs guide
⚡ Concurrent downloads always use
hf_xetIn a fresh process, the first concurrent
hf_hub_downloadcalls could read a placeholder version forhf_xetwhile another thread was still looking it up. Those calls treatedhf_xetas missing and downloaded through the plain HTTP path. This mostly affected parallel downloads such assnapshot_download, where some of the files skipped Xet. The version lookup is now cached only once it is resolved, so every download sees the real value._get_versionthat makes concurrent downloads skip hf_xet by @BramVanroy in #5102📂
HfFileSystemcache fixesThree fixes to how
HfFileSystemcaches listings and missing paths:ls()on a newly created empty bucket returns an empty list instead of raisingFileNotFoundError.ls()afterfind()orls(refresh=True)could return duplicate entries,refresh=Truekept deleted files, and listing a single bucket file cached it as the whole folder's listing.exists(path, refresh=True)andinvalidate_cache(path)now clear cached "not found" results. Before, a repo, branch or bucket created in the same process stayed missing until a fullinvalidate_cache().ls()on new empty bucket by @lhoestq in #5097💔 Breaking changes
hf jobs statsandHfApi.fetch_job_metricsreturn a single snapshot by default instead of streaming until the job completes. Use-f/--followorfollow=Trueto keep the previous behavior. See the section above (#5090).load_torch_modelnow raisesFileNotFoundErrorinstead ofValueErrorwhen the checkpoint path does not exist, andmodel_index_to_eval_resultsraisesValueErroron an empty list (#5063).[Bugfix] Fix wrong exception type and unbound variable guard by @vector15-05 in #5063
🖥️ CLI
--exclude ".venv/**"or--include "*.json"were expanded into local file names before reaching the command.hf download <repo> --include "*.json"in a folder containing a.jsonfile silently downloaded nothing.🔧 Other QoL improvements
hf cache prune/hf cache rmno longer scales quadratically with the number of files per revision.🐛 Bug and typo fixes
📖 Documentation
🏗️ Internal
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
v1.33.0: [v1.33.0] Better UX on large uploads and simpler skills installsCompare Source
📤 See progress while large Xet uploads validate
Very large Xet uploads used to sit silently between "Uploading" and "Committing" while shards were being finalized, which could take a long time with no feedback. The upload live display now shows a dedicated Validating bar — reported as a percentage instead of opaque internal validation-entry counts — both in the
upload_folderdisplay and inXetUploadProgressReporter(used byupload_file,create_commitand bucket uploads). This requireshf-xet>=1.6.0.🧩 Skills are now installed for every agent by default
hf skills addno longer requires a special flag for Claude Code. The skill is now always installed to.agents/skills(or~/.agents/skillswith-g) and symlinked into.claude/skills(honoringCLAUDE_CONFIG_DIRwhen set), so a single command covers Claude Code, Codex, Cursor, OpenCode, Pi and any other agent that loads skills from.agents/skills. The--claudeflag is deprecated: it still works as a no-op but prints a warning, and--destkeeps installing only to the directory you provide.hf skills updaterefreshes both roots the same way. Along the way,CLAUDE_CONFIG_DIRis now properly honored everywhere (it was previously ignored, which left skills invisible to relocated Claude Code installs).# works with Claude Code, Codex, Cursor, OpenCode, Pi and any agent that loads skills from `.agents/skills` hf skills addCLAUDE_CONFIG_DIRinhf skills add -g --claudeby @hanouticelina in #4957📚 Documentation: CLI guide
💔 Breaking Change
privateService.accountIdandprivateService.region. Use the newprivate_link_account_idandprivate_link_regionparameters (the region is required when the account ID is set, and is independent of the compute region). The legacyaccount_idkeyword still exists but is ignored and emits aFutureWarning; it is no longer included as a top-level payload field.🖥️ CLI
hf jobs run,hf jobs uv runand theirscheduledvariants (--formatbecame the script path,-qbecame the image name). They are now consumed wherever they appear; use--when your script needs them.bucketas a watched item type inhf webhooks create --watchby @davanstrien in #4958 — docs📖 Documentation
🐛 Bug and typo fixes
scan_cache_dirref names on Windows by @gokay-ai in #4925format_timesinceshowing "60 seconds ago" / "60 minutes ago" / "24 hours ago" instead of rolling over by @Sreekant13 in #4943BucketBatchErrorwhen a batch reports failed operations by @hanouticelina in #4954 — docshfpackage'spython_requireswith huggingface_hub by @sharziki in #4959🏗️ Internal
re.matchby @Wauplin in #4939v1.32.0: [v1.32.0] Shared blob store, sandbox security hardening and faster importsCompare Source
📂 [Cache] Shared blob store: deduplicate Xet files across repos
The cache now deduplicates Xet files across repos. A Xet file downloaded through
hf_xetis stored once at<CACHE_DIR>/blobs/<prefix>/<xet_hash>and every repo that needs it gets a relative symlink instead of a download: no bytes are transferred and no extra space is used, even across different repos — or after the repo that first downloaded the file was deleted. The per-repo snapshot layout is unchanged, older clients keep reading and downloading normally, and any failure to share silently falls back to regular repo-local storage. SetHF_HUB_DISABLE_SHARED_BLOBS=1to opt out entirely. Shared files carry a<xet_hash>.refsmanifest listing the repo blobs referencing them, whichhf cache rmconsults on deletion andhf cache prunesweeps to reclaim payloads that no cached repo uses anymore.📚 Documentation: Manage your cache
💻 [Jobs] Ship config inside UV scripts
A UV script that only runs correctly on a specific runtime can now carry that runtime with it. An optional
[tool.hf-jobs]table in the script's PEP 723 header acceptsimage,flavor,python,timeout,name,namespace,env,secrets,labels,volumes,network_groupandnetwork_aliases, andhf jobs uv runreads it at submit time. CLI flagsConfiguration
📅 Schedule: (in timezone Europe/Berlin)
* 0-3 * * 1)🚦 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.