From 8c02fe97714a234103c3cc1303293922de7c3162 Mon Sep 17 00:00:00 2001 From: kingbri Date: Tue, 23 Jul 2024 21:37:53 -0400 Subject: [PATCH] Downloader: Disable timeout This prevents TimeoutErrors from showing up. However, a longer timeout may be necessary since this is in the API. Turning it off for now will help resolve immediate errors. Signed-off-by: kingbri --- common/downloader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/downloader.py b/common/downloader.py index a0b16cb..b252a0f 100644 --- a/common/downloader.py +++ b/common/downloader.py @@ -145,7 +145,8 @@ async def hf_repo_download( logger.info(f"Saving {repo_id} to {str(download_path)}") try: - async with aiohttp.ClientSession() as session: + timeout = aiohttp.ClientTimeout(total=None) # Turn off timeout + async with aiohttp.ClientSession(timeout=timeout) as session: tasks = [] logger.info(f"Starting download for {repo_id}")