Skip to content

Commit 4d6b35d

Browse files
authored
fix sleep time (replace max by min)
1 parent e0e5ba1 commit 4d6b35d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/huggingface_hub/file_download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def _request_with_retry(
225225
logger.info(
226226
f"{method} request to {url} timed out, retrying... [{tries/max_retries}]"
227227
)
228-
sleep_time = max(
228+
sleep_time = min(
229229
max_wait_time, base_wait_time * 2 ** (tries - 1)
230230
) # Exponential backoff
231231
time.sleep(sleep_time)

0 commit comments

Comments
 (0)