@@ -511,7 +511,9 @@ 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
- raise Exception (f"The setting model_name_or_path:{ model_name_or_path } is not exist." )
514
+ raise Exception (
515
+ f"The { revision } of { model_name_or_path } is not exist. Please check the model name or revision."
516
+ )
515
517
elif model_source == "MODELSCOPE" :
516
518
try :
517
519
from modelscope .hub .snapshot_download import (
@@ -526,7 +528,9 @@ def retrive_model_from_server(model_name_or_path, revision="master"):
526
528
modelscope_download (repo_id = repo_id , revision = revision , local_dir = local_path )
527
529
model_name_or_path = local_path
528
530
except Exception :
529
- raise Exception (f"The setting model_name_or_path:{ model_name_or_path } is not exist." )
531
+ raise Exception (
532
+ f"The { revision } of { model_name_or_path } is not exist. Please check the model name or revision."
533
+ )
530
534
elif model_source == "HUGGINGFACE" :
531
535
try :
532
536
from huggingface_hub ._snapshot_download import (
@@ -544,7 +548,9 @@ def retrive_model_from_server(model_name_or_path, revision="master"):
544
548
huggingface_download (repo_id = repo_id , revision = revision , local_dir = local_path )
545
549
model_name_or_path = local_path
546
550
except Exception :
547
- raise Exception (f"The setting model_name_or_path:{ model_name_or_path } is not exist." )
551
+ raise Exception (
552
+ f"The { revision } of { model_name_or_path } is not exist. Please check the model name or revision."
553
+ )
548
554
else :
549
555
raise ValueError (
550
556
f"Unsupported model source: { model_source } , please choose one of ['MODELSCOPE', 'AISTUDIO', 'HUGGINGFACE']"
0 commit comments