[object Object]

← back to Exo

creating HFShardDownloader with quick_check true so it doesnt start downloading models

649157d4085a63a7d39c1e424c186fef7ae5f861 · 2024-11-16 16:36:06 -0800 · cadenmackenzie

Files touched

Diff

commit 649157d4085a63a7d39c1e424c186fef7ae5f861
Author: cadenmackenzie <cadenmackenzie@gmail.com>
Date:   Sat Nov 16 16:36:06 2024 -0800

    creating HFShardDownloader with quick_check true so it doesnt start downloading models
---
 exo/api/chatgpt_api.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/exo/api/chatgpt_api.py b/exo/api/chatgpt_api.py
index dfb44e8b..e899e816 100644
--- a/exo/api/chatgpt_api.py
+++ b/exo/api/chatgpt_api.py
@@ -223,7 +223,8 @@ class ChatGPTAPI:
                 if all(map(lambda engine: engine in model_info["repo"], required_engines)):
                     shard = build_base_shard(model_name, self.inference_engine_classname)
                     if shard:
-                        downloader = HFShardDownloader()
+                        # Use HFShardDownloader to check status without initiating download
+                        downloader = HFShardDownloader(quick_check=True)  # quick_check=True prevents downloads
                         downloader.current_shard = shard
                         downloader.current_repo_id = get_repo(shard.model_id, self.inference_engine_classname)
                         status = await downloader.get_shard_download_status()

← 3d0e2f1d fix preemptive downloads with ensure_shard  ·  back to Exo  ·  adding padding and min height 379ee453 →