File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1328,7 +1328,9 @@ def _download_model_from_hf(
1328
1328
if local_dir :
1329
1329
local_dir = os .path .join (local_dir , model_name )
1330
1330
os .makedirs (local_dir , exist_ok = True )
1331
- snapshot_download (
1331
+
1332
+ # if local_dir is not set, the return value points to the cached data folder
1333
+ local_dir = snapshot_download (
1332
1334
repo_id = model_name ,
1333
1335
local_dir = local_dir ,
1334
1336
allow_patterns = allow_patterns ,
Original file line number Diff line number Diff line change @@ -743,6 +743,7 @@ def test_import_verified_model(
743
743
app = AquaModelApp ()
744
744
if download_from_hf :
745
745
with tempfile .TemporaryDirectory () as tmpdir :
746
+ mock_snapshot_download .return_value = f"{ str (tmpdir )} /{ model_name } "
746
747
model : AquaModel = app .register (
747
748
model = model_name ,
748
749
os_path = os_path ,
You can’t perform that action at this time.
0 commit comments