diff --git a/param_decomp_lab/infra/hf_http.py b/param_decomp_lab/infra/hf_http.py index 5d461e829..ba70620d5 100644 --- a/param_decomp_lab/infra/hf_http.py +++ b/param_decomp_lab/infra/hf_http.py @@ -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). """ @@ -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,