Upgrading huggingface-hub 0.22 to 0.23
Breaking0.22.2 → 0.23.5Breaking5Deprecated1New13Changed13Fixed14Other48
BreakingUpgrade verdict
5 breaking changes.
In plain terms
- The old file listing function is gone; use the newer alternatives.
- The old method to start the webhook server is gone; use launch instead.
- If you were passing a custom server address to push_to_hub, you now set it with an environment variable instead.
- Downloads now use a hidden cache folder, symlinks are no longer used, and resuming is on by default.
Must act Top 4 of 6 that need code or config changes
What you must change
Breaking5
Removes list_files_info in favor of get_paths_info and list_repo_tree.
list_files_infoget_paths_infolist_repo_treeRemoves WebhookServer.run in favor of WebhookServer.launch.
WebhookServer.runWebhookServer.launchRemoves the
api_endpoint argument from ModelHubMixin's push_to_hub method in favor of the HF_ENDPOINT environment variable.ModelHubMixinpush_to_hubapi_endpointHF_ENDPOINTChanges download layout: adds a .cache/huggingface/ folder and ignores --local-dir-use-symlink and --resume-download.
--local-dir-use-symlink--resume-download--force-downloadUpdates InferenceClient.chat_completion and text_generation return classes to match TGI output exactly.
InferenceClient.chat_completionInferenceClient.text_generationTextGenerationOutputDeprecations to plan for
Deprecated1
Deprecates the resume_download parameter since resumable downloads are now handled automatically.
resume_download