Skip to content

Commit 09e82a0

Browse files
Lokiiiiiiredhairdragon
authored andcommitted
Adding back adapter request registration (#2959)
1 parent 7f24726 commit 09e82a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

engines/python/setup/djl_python/lmi_vllm/vllm_async_service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ async def add_lora(self, lora_name: str, lora_alias: str, lora_path: str):
273273
logging.info(f"Adding LoRA {lora_name} from {lora_path}")
274274
lora_id = self.lora_id_counter.inc(1)
275275
lora_request = create_lora_request(lora_name, lora_id, lora_path, None)
276+
# Register the LoRA request with the model registry so vLLM can find it
277+
self.model_registry.lora_requests[lora_name] = lora_request
276278
self.lora_requests[lora_request.lora_name] = lora_request
277279
result = await self.vllm_engine.add_lora(lora_request)
278280
logging.info(f"LoRA {lora_name} added to engine: {result}")
@@ -285,6 +287,7 @@ async def remove_lora(self, lora_name: str, lora_alias: str):
285287
lora_request = get_lora_request(lora_name, self.lora_requests)
286288
result = await self.vllm_engine.remove_lora(lora_request.lora_int_id)
287289
del self.lora_requests[lora_name]
290+
del self.model_registry.lora_requests[lora_name]
288291
return result
289292

290293
async def pin_lora(self, lora_name: str, lora_alias: str):

0 commit comments

Comments
 (0)