Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
44073a7a
Unverified
Commit
44073a7a
authored
May 25, 2025
by
Ning Xie
Committed by
GitHub
May 25, 2025
Browse files
[BUGFIX] catch subclass first for try...except (#18672)
Signed-off-by:
Andy Xie
<
andy.xning@gmail.com
>
parent
63934543
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vllm/model_executor/model_loader/weight_utils.py
vllm/model_executor/model_loader/weight_utils.py
+3
-2
No files found.
vllm/model_executor/model_loader/weight_utils.py
View file @
44073a7a
...
@@ -319,6 +319,7 @@ def download_safetensors_index_file_from_hf(
...
@@ -319,6 +319,7 @@ def download_safetensors_index_file_from_hf(
Args:
Args:
model_name_or_path (str): The model name or path.
model_name_or_path (str): The model name or path.
index_file (str): The safetensors index file name
cache_dir (Optional[str]): The cache directory to store the model
cache_dir (Optional[str]): The cache directory to store the model
weights. If None, will use HF defaults.
weights. If None, will use HF defaults.
revision (Optional[str]): The revision of the model.
revision (Optional[str]): The revision of the model.
...
@@ -337,10 +338,10 @@ def download_safetensors_index_file_from_hf(
...
@@ -337,10 +338,10 @@ def download_safetensors_index_file_from_hf(
)
)
# If file not found on remote or locally, we should not fail since
# If file not found on remote or locally, we should not fail since
# only some models will have index_file.
# only some models will have index_file.
except
huggingface_hub
.
utils
.
EntryNotFoundError
:
logger
.
info
(
"No %s found in remote."
,
index_file
)
except
huggingface_hub
.
utils
.
LocalEntryNotFoundError
:
except
huggingface_hub
.
utils
.
LocalEntryNotFoundError
:
logger
.
info
(
"No %s found in local cache."
,
index_file
)
logger
.
info
(
"No %s found in local cache."
,
index_file
)
except
huggingface_hub
.
utils
.
EntryNotFoundError
:
logger
.
info
(
"No %s found in remote."
,
index_file
)
# For models like Mistral-7B-v0.3, there are both sharded
# For models like Mistral-7B-v0.3, there are both sharded
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment