Skip to content

Commit

Permalink
[python][fix] check whether config has enable_lora attribute (#2616)
Browse files Browse the repository at this point in the history
  • Loading branch information
sindhuvahinis authored Dec 2, 2024
1 parent 05d07a9 commit 3e38ebf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/python/setup/djl_python/input_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def add_server_maintained_params(request_input: RequestInput,

def parse_adapters(request_input: TextInput, input_item: Input,
input_map: Dict, **kwargs):
if kwargs.get("configs").enable_lora:
configs = kwargs.get("configs")
if hasattr(configs, "enable_lora") and configs.enable_lora:
adapter_registry = kwargs.get("adapter_registry")
input_len = len(request_input.input_text) if isinstance(
request_input.input_text, list) else 1
Expand Down

0 comments on commit 3e38ebf

Please sign in to comment.