Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaddair committed Mar 26, 2024
1 parent c7e6e8e commit 6411587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/lorax_server/utils/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def merge_adapter_weights(
Returns:
Tuple[Dict[str, torch.Tensor], Set[str]]: A tuple containing the merged weights and the set of processed adapter weight names.
"""
from lorax_server.adapters.config import LoraConfig
from lorax_server.adapters.lora import LoraConfig

if not isinstance(adapter_config, LoraConfig):
raise ValueError(f"Unsupported adapter config type: {type(adapter_config)}")
Expand Down
2 changes: 1 addition & 1 deletion server/tests/utils/test_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_batched_lora_weights(lora_ranks: List[int]):
batched_weights.add_adapter(idx, weights)

assert not batched_weights.is_empty()
assert len(batched_weights.lora_weights) == 2
assert len(batched_weights.adapter_weights) == 2

meta = AdapterBatchMetadata(
adapter_indices=torch.tensor([0, 0, 1, 1, 0, 0, 1, 1], dtype=torch.int64),
Expand Down

0 comments on commit 6411587

Please sign in to comment.