← back to Exo
always log download errors. some people eg cant access huggingface which causes confusion
b4e6f8acad64b1a8567a2e63991b019b8ef0a6d4 · 2025-02-13 22:55:09 +0000 · Alex Cheema
Files touched
M exo/download/new_shard_download.py
Diff
commit b4e6f8acad64b1a8567a2e63991b019b8ef0a6d4
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Thu Feb 13 22:55:09 2025 +0000
always log download errors. some people eg cant access huggingface which causes confusion
---
exo/download/new_shard_download.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/exo/download/new_shard_download.py b/exo/download/new_shard_download.py
index 21b3f046..5e6531f0 100644
--- a/exo/download/new_shard_download.py
+++ b/exo/download/new_shard_download.py
@@ -134,6 +134,8 @@ async def download_file_with_retry(repo_id: str, revision: str, path: str, targe
try: return await _download_file(repo_id, revision, path, target_dir, on_progress)
except Exception as e:
if isinstance(e, FileNotFoundError) or attempt == n_attempts - 1: raise e
+ print(f"Download error on attempt {attempt}/{n_attempts} for {repo_id=} {revision=} {path=} {target_dir=}")
+ traceback.print_exc()
await asyncio.sleep(min(8, 0.1 * (2 ** attempt)))
async def _download_file(repo_id: str, revision: str, path: str, target_dir: Path, on_progress: Callable[[int, int], None] = lambda _, __: None) -> Path:
← 928214d4 apt-get debian noninteractive in circleci
·
back to Exo
·
make max_parallel_downloads configurable, increase download 477e3a5e →