From c41108231e2c53e39272172a6c0f80f33319f2cb Mon Sep 17 00:00:00 2001 From: Somasundaram Date: Mon, 2 Dec 2024 10:34:45 -0800 Subject: [PATCH] [python] check whether config has enable_lora attribute --- engines/python/setup/djl_python/input_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/python/setup/djl_python/input_parser.py b/engines/python/setup/djl_python/input_parser.py index d0f331a45..6f87e2dd9 100644 --- a/engines/python/setup/djl_python/input_parser.py +++ b/engines/python/setup/djl_python/input_parser.py @@ -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