Repository navigation
Update Hugging Face training stack (major) - abandoned - #78
Closed
renovate[bot] wants to merge 2 commits into
Closed
renovate[bot] wants to merge 2 commits into
renovate[bot] wants to merge 2 commits into
Conversation
This was referenced Nov 25, 2026
Contributor
ItayPodhajcer
added a commit
that referenced
this pull request
Nov 25, 2026
Folds #78 (huggingface_hub 2.4.0, trl 1.18.2) and #73 (pytorch 2.14.1) into this change, so both images publish once, as transformers-gpu:5.24.1 and trl:1.18.2, with no -r1 rebuilds in between. datasets 5.2 no longer depends on fsspec[http], so aiohttp is pinned for load_dataset over http(s). TRL 1 reports every training run to huggingface.co, so both images set HF_HUB_DISABLE_TELEMETRY=1. The transformers docs now name torch 2.14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
Contributor
Author
Autoclosing SkippedThis PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error. |
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.33.0→==2.4.0==0.29.1→==1.18.2Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
huggingface/huggingface_hub (huggingface_hub)
v2.4.0: [v2.4.0] Copy files into Buckets withHfFileSystem, outdated CLI extension hintsCompare Source
🪣 Copy files into Buckets with
HfFileSystemHfFileSystemraisedNotImplementedErroron any copy involving a Bucket. Copying into a Bucket now works from the same Bucket, from another Bucket, or from a model, dataset or Space repo. Files stored with Xet are copied on the Hub by hash, so nothing is downloaded. Other repo files are downloaded and then uploaded to the Bucket. fsspec moves a file by copying it and deleting the source, somvandrenamenow work inside a Bucket too.Copying from a Bucket to a repo is not supported yet.
🧩 See when a CLI extension is outdated
hf extensions listonly showed when each extension was installed, so there was no way to know that an update was available. It now has aVERSIONcolumn (the commit the extension was installed from) and aLATESTcolumn, plus a hint naming the outdated extensions. Running an outdated extension also prints a hint, at most once a day. To stay within GitHub's rate limits,hflooks up the latest commit of each extension at most once a day. SetHF_HUB_DISABLE_UPDATE_CHECK=1to turn these checks off.hf extensions updatealso repairs Python extensions that no longer start. After a Homebrew upgrade removed the Python an extension was installed with, running it failed withdyld: Library not loaded, andhf extensions updatesaid it was already up to date. It now recreates the extension's virtual environment when its Python doesn't start, even if no newer commit exists.🔧 Other QoL improvements
(repository not found)error as a typo in the repo name. The error now also tells you to check that you are authenticated.🐛 Bug and typo fixes
hf webhooks createfailed unless you passed--domain repo, and watching discussions was not possible because the accepted value wasdiscussionsinstead ofdiscussion.create_webhooknow watches both domains whendomainsis omitted.../or absolute paths could resolve outside the cache folder. They are now rejected, as inhf_hub_download.hf://file.hf cache verify --local-dirreported the.cache/huggingface/metadata as extra files, so--fail-on-extra-filesfailed on every clean download.hf cache verifycrashed withUnicodeEncodeErrorinstead of listing the files that failed verification.📖 Documentation
🏗️ Internal
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
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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.