← back to Exo
only in_progress if any given file is in_progress
96f1aecb05754a7d2eca9c7cef7cb828630866c2 · 2025-01-29 18:43:43 +0000 · Alex Cheema
Files touched
M exo/download/new_shard_download.py
Diff
commit 96f1aecb05754a7d2eca9c7cef7cb828630866c2
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Wed Jan 29 18:43:43 2025 +0000
only in_progress if any given file is in_progress
---
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 cb2b55ea..e7410284 100644
--- a/exo/download/new_shard_download.py
+++ b/exo/download/new_shard_download.py
@@ -105,7 +105,7 @@ def calculate_repo_progress(shard: Shard, repo_id: str, revision: str, file_prog
elapsed_time = time.time() - all_start_time
all_speed = all_downloaded_bytes_this_session / elapsed_time if elapsed_time > 0 else 0
all_eta = timedelta(seconds=(all_total_bytes - all_downloaded_bytes) / all_speed) if all_speed > 0 else timedelta(seconds=0)
- status = "complete" if all(p.status == "complete" for p in file_progress.values()) else "not_started" if all(p.status == "not_started" for p in file_progress.values()) else "in_progress"
+ status = "complete" if all(p.status == "complete" for p in file_progress.values()) else "in_progress" if any(p.status == "in_progress" for p in file_progress.values()) else "not_started"
return RepoProgressEvent(shard, repo_id, revision, len([p for p in file_progress.values() if p.downloaded == p.total]), len(file_progress), all_downloaded_bytes, all_downloaded_bytes_this_session, all_total_bytes, all_speed, all_eta, file_progress, status)
async def get_weight_map(repo_id: str, revision: str = "main") -> Dict[str, str]:
← 23a50306 even if part of a file is downloaded it may not be in_progre
·
back to Exo
·
throttle repo progress events and only send them out if some 3675804f →