Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1d4f0bc
multi-source download
Yzc216 Jul 22, 2025
7dc5174
multi-source download
Yzc216 Jul 22, 2025
4ecb6e4
huggingface download revision
Yzc216 Jul 23, 2025
96a5690
requirement
Yzc216 Jul 23, 2025
647981c
Merge branch 'develop' into feature/multi-source-download
Yzc216 Jul 23, 2025
a47fab2
style
Yzc216 Jul 23, 2025
344af87
add revision arg
Yzc216 Jul 23, 2025
4bb1840
test
Yzc216 Jul 23, 2025
d16a853
Merge branch 'develop' into feature/multi-source-download
Yzc216 Jul 23, 2025
bf4adba
pre-commit
Yzc216 Jul 23, 2025
08965cb
Merge branch 'develop' into feature/multi-source-download
Yzc216 Jul 24, 2025
a8bad86
Merge branch 'develop' into feature/multi-source-download
Yzc216 Jul 24, 2025
e343527
Change default download
Yzc216 Jul 24, 2025
22539c2
merge upstream
Yzc216 Jul 24, 2025
fb8dd63
change requirements.txt
Yzc216 Jul 24, 2025
1733539
modify English Documentation
Yzc216 Jul 24, 2025
602fed2
Merge branch 'develop' into feature/multi-source-download
Yzc216 Jul 24, 2025
1c93ec7
documentation
Yzc216 Jul 24, 2025
05a35ee
Merge branch 'develop' into feature/multi-source-download
Yzc216 Jul 24, 2025
e65f51a
Merge remote-tracking branch 'upstream/develop' into feature/multi-so…
Yzc216 Jul 29, 2025
3be59c3
modify model download path
Yzc216 Jul 29, 2025
bda152c
Merge remote-tracking branch 'upstream/develop' into feature/multi-so…
Yzc216 Aug 1, 2025
1f6ac9f
add requirements
Yzc216 Aug 1, 2025
330f3f5
Merge branch 'develop' into feature/multi-source-download
Yzc216 Aug 1, 2025
df76819
error optimization
Yzc216 Aug 5, 2025
855e952
连接失败兜底
Yzc216 Aug 5, 2025
2caafc0
连接失败兜底
Yzc216 Aug 5, 2025
77afe74
连接失败兜底
Yzc216 Aug 6, 2025
31b5270
unit test
Yzc216 Aug 6, 2025
2c66a34
unit test
Yzc216 Aug 6, 2025
2c7351e
Merge branch 'develop' into feature/multi-source-download
Yzc216 Aug 6, 2025
d08b9c8
unit test
Yzc216 Aug 6, 2025
7fcdc46
test
Yzc216 Aug 6, 2025
ce7de5e
test
Yzc216 Aug 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions fastdeploy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,15 @@ def retrive_model_from_server(model_name_or_path, revision="master"):
aistudio_download(repo_id=repo_id, revision=revision, local_dir=local_path)
model_name_or_path = local_path
except Exception:
raise Exception(f"The setting model_name_or_path:{model_name_or_path} is not exist.")
if os.path.exists(local_path):
llm_logger.error(
f"Failed to connect to aistudio, but detected that the model directory {local_path} exists. Attempting to start."
)
return local_path
else:
raise Exception(
f"The {revision} of {model_name_or_path} is not exist. Please check the model name or revision."
)
elif model_source == "MODELSCOPE":
try:
from modelscope.hub.snapshot_download import (
Expand All @@ -526,7 +534,15 @@ def retrive_model_from_server(model_name_or_path, revision="master"):
modelscope_download(repo_id=repo_id, revision=revision, local_dir=local_path)
model_name_or_path = local_path
except Exception:
raise Exception(f"The setting model_name_or_path:{model_name_or_path} is not exist.")
if os.path.exists(local_path):
llm_logger.error(
f"Failed to connect to modelscope, but detected that the model directory {local_path} exists. Attempting to start."
)
return local_path
else:
raise Exception(
f"The {revision} of {model_name_or_path} is not exist. Please check the model name or revision."
)
elif model_source == "HUGGINGFACE":
try:
from huggingface_hub._snapshot_download import (
Expand All @@ -544,7 +560,9 @@ def retrive_model_from_server(model_name_or_path, revision="master"):
huggingface_download(repo_id=repo_id, revision=revision, local_dir=local_path)
model_name_or_path = local_path
except Exception:
raise Exception(f"The setting model_name_or_path:{model_name_or_path} is not exist.")
raise Exception(
f"The {revision} of {model_name_or_path} is not exist. Please check the model name or revision."
)
else:
raise ValueError(
f"Unsupported model source: {model_source}, please choose one of ['MODELSCOPE', 'AISTUDIO', 'HUGGINGFACE']"
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use-triton-in-paddle
crcmod
fastsafetensors==0.1.14
msgpack
modelscope
opentelemetry-api>=1.24.0
opentelemetry-sdk>=1.24.0
opentelemetry-instrumentation-redis
Expand Down
Loading