File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -511,11 +511,11 @@ def retrive_model_from_server(model_name_or_path, revision="master"):
511
511
aistudio_download (repo_id = repo_id , revision = revision , local_dir = local_path )
512
512
model_name_or_path = local_path
513
513
except Exception :
514
- if os .path .exists (model_name_or_path ):
514
+ if os .path .exists (local_path ):
515
515
llm_logger .error (
516
516
"Failed to connect to aistudio, but detected that the model directory exists. Attempting to start."
517
517
)
518
- return model_name_or_path
518
+ return local_path
519
519
else :
520
520
raise Exception (
521
521
f"The { revision } of { model_name_or_path } is not exist. Please check the model name or revision."
@@ -534,11 +534,11 @@ def retrive_model_from_server(model_name_or_path, revision="master"):
534
534
modelscope_download (repo_id = repo_id , revision = revision , local_dir = local_path )
535
535
model_name_or_path = local_path
536
536
except Exception :
537
- if os .path .exists (model_name_or_path ):
537
+ if os .path .exists (local_path ):
538
538
llm_logger .error (
539
539
"Failed to connect to modelscope, but detected that the model directory exists. Attempting to start."
540
540
)
541
- return model_name_or_path
541
+ return local_path
542
542
else :
543
543
raise Exception (
544
544
f"The { revision } of { model_name_or_path } is not exist. Please check the model name or revision."
You can’t perform that action at this time.
0 commit comments