Skip to content

Commit

Permalink
fix: Properly split out model_id when retrieving adapter weights down…
Browse files Browse the repository at this point in the history
…loaded from S3 (#246)
  • Loading branch information
jeffreyftang authored Feb 14, 2024
1 parent 670201d commit ffcf9ab
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit ffcf9ab

Please sign in to comment.