Skip to content
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

fix: checking the base_model_name_or_path of adapter_config and early return if null #431

Merged
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
4 changes: 4 additions & 0 deletions server/lorax_server/utils/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def _load_and_merge(

def check_architectures(model_id: str, adapter_id: str, adapter_config: "AdapterConfig"):
try:
if not adapter_config.base_model_name_or_path:
# Avoid execuation latency caused by the network connection retrying for AutoConfig.from_pretrained(None)
return

expected_config = AutoConfig.from_pretrained(model_id)
model_config = AutoConfig.from_pretrained(adapter_config.base_model_name_or_path)
except Exception as e:
Expand Down
Loading