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: Properly split out model_id when retrieving adapter weights downloaded from S3 #246

Merged
merged 1 commit into from
Feb 14, 2024
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
3 changes: 2 additions & 1 deletion server/lorax_server/utils/sources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from .hub import EntryNotFoundError, LocalEntryNotFoundError, RevisionNotFoundError, get_hub_model_local_dir, weight_files, download_weights, weight_hub_files, HubModelSource
from .local import LocalModelSource, get_model_local_dir
from .s3 import S3ModelSource, get_s3_model_local_dir
from .s3 import S3ModelSource, get_s3_model_local_dir, _get_bucket_and_model_id

HUB = "hub"
S3 = "s3"
Expand Down Expand Up @@ -55,6 +55,7 @@ def get_config_path(model_id: str, source: str) -> str:
if source == HUB:
return model_id
elif source == S3:
_, model_id = _get_bucket_and_model_id(model_id)
return get_s3_model_local_dir(model_id).as_posix()
elif source == LOCAL:
return get_model_local_dir(model_id).as_posix()
Expand Down
Loading