[object Object]

← back to Exo

fix

400e428a1e5ed6cf515897bfb2817aec138fcd43 · 2024-11-21 03:40:30 -0800 · josh

Files touched

Diff

commit 400e428a1e5ed6cf515897bfb2817aec138fcd43
Author: josh <eyasufikru567@gmail.com>
Date:   Thu Nov 21 03:40:30 2024 -0800

    fix
---
 exo/download/hf/hf_helpers.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/exo/download/hf/hf_helpers.py b/exo/download/hf/hf_helpers.py
index 5cf4990a..6f27329a 100644
--- a/exo/download/hf/hf_helpers.py
+++ b/exo/download/hf/hf_helpers.py
@@ -17,7 +17,6 @@ from exo.helpers import DEBUG, is_frozen
 from exo.download.download_progress import RepoProgressEvent, RepoFileProgressEvent, RepoProgressCallback, RepoFileProgressCallback
 from exo.inference.shard import Shard
 import aiofiles
-from aiofiles import os as aios
 
 T = TypeVar("T")
 
@@ -107,10 +106,10 @@ def get_repo_root(repo_id: str) -> Path:
 
 async def move_models_to_hf(seed_dir: Union[str, Path]):
   """Move model in resources folder of app to .cache/huggingface/hub"""
-  source_dir = AsyncPath(seed_dir)
-  dest_dir = AsyncPath(get_hf_home()/"hub")
+  source_dir = Path(seed_dir)
+  dest_dir = get_hf_home()/"hub"
   await aios.makedirs(dest_dir, exist_ok=True)   
-  async for path in source_dir.iterdir():
+  async for path in await aios.listdir(source_dir):
     if await path.is_dir() and path.name.startswith("models--"):
       dest_path = dest_dir / path.name
       try:

← 3210912a removed unused import  ·  back to Exo  ·  pr fixes 913fdcc6 →