[object Object]

← back to Exo

set timeout on get too

265586f7b45b46b3d5a45d12401930923ac6f517 · 2025-01-27 06:05:40 +0000 · Alex Cheema

Files touched

Diff

commit 265586f7b45b46b3d5a45d12401930923ac6f517
Author: Alex Cheema <alexcheema123@gmail.com>
Date:   Mon Jan 27 06:05:40 2025 +0000

    set timeout on get too
---
 exo/download/new_shard_download.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exo/download/new_shard_download.py b/exo/download/new_shard_download.py
index 2093cbcc..114353a1 100644
--- a/exo/download/new_shard_download.py
+++ b/exo/download/new_shard_download.py
@@ -89,7 +89,7 @@ async def download_file(session: aiohttp.ClientSession, repo_id: str, revision:
   base_url = f"{get_hf_endpoint()}/{repo_id}/resolve/{revision}/"
   url = urljoin(base_url, path)
   headers = await get_auth_headers()
-  async with session.get(url, headers=headers) as r:
+  async with session.get(url, headers=headers, timeout=aiohttp.ClientTimeout(total=1800, connect=60, sock_read=1800, sock_connect=60)) as r:
     assert r.status == 200, f"Failed to download {path} from {url}: {r.status}"
     length = int(r.headers.get('content-length', 0))
     n_read = 0

← 4748bb7d increase file download timeout to 30min  ·  back to Exo  ·  ignore not_started progress updates 90e0e276 →