Skip to content

Commit d29081f

Browse files
andyxningminpeter
authored andcommitted
raise exception for pin_lora (vllm-project#19809)
Signed-off-by: Andy Xie <andy.xning@gmail.com> Signed-off-by: minpeter <kali2005611@gmail.com>
1 parent e96999c commit d29081f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

vllm/worker/worker_base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ def remove_lora(self, lora_id: int) -> bool:
202202
raise ValueError(f"{type(self)} does not support LoRA")
203203

204204
def pin_lora(self, lora_id: int) -> bool:
205-
return ValueError(
206-
f"{type(self)} does not support LoRA") # type: ignore
205+
raise ValueError(f"{type(self)} does not support LoRA")
207206

208207
def list_loras(self) -> Set[int]:
209208
raise ValueError(f"{type(self)} does not support LoRA")
@@ -398,7 +397,7 @@ def execute_model(
398397

399398
model_input, worker_input, kwargs = inputs
400399
num_steps = worker_input.num_steps
401-
if (execute_model_req is not None and execute_model_req.spec_step_idx):
400+
if execute_model_req is not None and execute_model_req.spec_step_idx:
402401
kwargs["spec_step_idx"] = execute_model_req.spec_step_idx
403402

404403
self.execute_worker(worker_input)

0 commit comments

Comments
 (0)