Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
almost there
Browse files Browse the repository at this point in the history
  • Loading branch information
robertgshaw2-redhat committed Jul 31, 2024
1 parent 30a4f4d commit bd27519
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions vllm/entrypoints/openai/rpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ class RPCUtilityRequest(Enum):
GET_MODEL_CONFIG = 2
GET_DECODING_CONFIG = 3
GET_PARALLEL_CONFIG = 4
GET_LORA_CONFIG = 5
DO_LOG_STATS = 6
CHECK_HEALTH = 7
GET_SCHEDULER_CONFIG = 5
GET_LORA_CONFIG = 6
DO_LOG_STATS = 7
CHECK_HEALTH = 8


RPC_REQUEST_TYPE = Union[RPCGenerateRequest, RPCAbortRequest,
Expand Down
6 changes: 2 additions & 4 deletions vllm/entrypoints/openai/rpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ async def _send_one_way_rpc_request(self, request: RPC_REQUEST_TYPE,
return response

async def get_tokenizer(self, lora_request: LoRARequest):
# TODO: handle this via get data? - or avoid doing via RPC
return self.tokenizer
await self.tokenizer.get_lora_tokenizer_async(lora_request)

async def is_tracing_enabled(self):
# TODO: what is this?
Expand Down Expand Up @@ -144,12 +143,11 @@ async def get_lora_config(self):
"""Get LoRAConfig from the RPCServer"""

return await self._send_get_data_rpc_request(
RPCUtilityRequest.GET_SCHEDULER_CONFIG,
RPCUtilityRequest.GET_LORA_CONFIG,
expected_type=LoRAConfig,
error_message="Could not get LoRAConfig from RPC Server"
)


async def abort(self, request_id: str):
"""Send an ABORT_REQUEST signal to the RPC Server"""

Expand Down
2 changes: 2 additions & 0 deletions vllm/entrypoints/openai/rpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def _make_handler_coro(self, identity,
return self.get_parallel_config(identity)
elif request == RPCUtilityRequest.GET_DECODING_CONFIG:
return self.get_decoding_config(identity)
elif request == RPCUtilityRequest.GET_SCHEDULER_CONFIG:
return self.get_scheduler_config(identity)
elif request == RPCUtilityRequest.GET_LORA_CONFIG:
return self.get_lora_config(identity)
elif request == RPCUtilityRequest.DO_LOG_STATS:
Expand Down

0 comments on commit bd27519

Please sign in to comment.