Skip to content

[BUGFIX] catch subclass first for try...except #18672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions vllm/model_executor/model_loader/weight_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def download_safetensors_index_file_from_hf(

Args:
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
weights. If None, will use HF defaults.
revision (Optional[str]): The revision of the model.
Expand All @@ -337,10 +338,10 @@ def download_safetensors_index_file_from_hf(
)
# If file not found on remote or locally, we should not fail since
# 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:
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
Expand Down
Loading