Skip to content

Upgrading huggingface-hub 0.22 to 0.23

Breaking0.22.2 → 0.23.5Breaking5Deprecated1New13Changed13Fixed14Other48

BreakingUpgrade verdict

5 breaking changes.

  • 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.
Top 4 of 6 that need code or config changes
Breaking5
Removes list_files_info in favor of get_paths_info and list_repo_tree.
list_files_infoget_paths_infolist_repo_tree
Removes WebhookServer.run in favor of WebhookServer.launch.
WebhookServer.runWebhookServer.launch
Removes the api_endpoint argument from ModelHubMixin's push_to_hub method in favor of the HF_ENDPOINT environment variable.
ModelHubMixinpush_to_hubapi_endpointHF_ENDPOINT
Changes download layout: adds a .cache/huggingface/ folder and ignores --local-dir-use-symlink and --resume-download.
--local-dir-use-symlink--resume-download--force-download
Updates InferenceClient.chat_completion and text_generation return classes to match TGI output exactly.
InferenceClient.chat_completionInferenceClient.text_generationTextGenerationOutput
Deprecated1
Deprecates the resume_download parameter since resumable downloads are now handled automatically.
resume_download