From b1a325cab1a5d7440cc4284a67da1fea70d68c05 Mon Sep 17 00:00:00 2001 From: Sreekant Baheti <60787859+Sreekant13@users.noreply.github.com> Date: Sun, 28 Jun 2026 22:43:06 -0700 Subject: [PATCH] Fix misleading max_retries docstring in http_backoff helpers --- src/huggingface_hub/utils/_http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/huggingface_hub/utils/_http.py b/src/huggingface_hub/utils/_http.py index ced118ca2ee..d144005ba73 100644 --- a/src/huggingface_hub/utils/_http.py +++ b/src/huggingface_hub/utils/_http.py @@ -527,7 +527,7 @@ def http_backoff( url (`str`): The URL of the resource to fetch. max_retries (`int`, *optional*, defaults to `5`): - Maximum number of retries, defaults to 5 (no retries). + Maximum number of retries, defaults to 5. Set to `0` to disable retries. base_wait_time (`float`, *optional*, defaults to `1`): Duration (in seconds) to wait before retrying the first time. Wait time between retries then grows exponentially, capped by @@ -608,7 +608,7 @@ def http_stream_backoff( url (`str`): The URL of the resource to fetch. max_retries (`int`, *optional*, defaults to `5`): - Maximum number of retries, defaults to 5 (no retries). + Maximum number of retries, defaults to 5. Set to `0` to disable retries. base_wait_time (`float`, *optional*, defaults to `1`): Duration (in seconds) to wait before retrying the first time. Wait time between retries then grows exponentially, capped by