Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions param_decomp_lab/infra/hf_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
adapter for metadata calls like `HfApi.repo_info` — the call `datasets` makes to resolve
a streaming dataset's layout at startup. A single `ReadTimeout` there raises, and in a
DDP job that one rank's failure tears down every rank before training begins. This mounts
a retrying adapter on the session factory so connect/read timeouts and 5xx/429 are
a retrying adapter on the session factory so connect/read timeouts and 408/429/5xx are
retried with jittered backoff across *all* Hub HTTP calls (dataset, tokenizer, model).
"""

Expand Down Expand Up @@ -36,7 +36,7 @@ def configure_hf_http_retries(*, total_retries: int = 5, backoff_factor: float =
status=total_retries,
backoff_factor=backoff_factor,
backoff_jitter=1.0,
status_forcelist=(429, 500, 502, 503, 504),
status_forcelist=(408, 429, 500, 502, 503, 504),
allowed_methods=frozenset({"GET", "HEAD", "OPTIONS"}),
respect_retry_after_header=True,
raise_on_status=False,
Expand Down