[Misc] Support passing multiple request ids at once to AsyncLLM.abort() (#22944)

Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
Nick Hill
2025-08-15 17:00:36 -07:00
committed by GitHub
parent 236b864e4f
commit ad0297d113
6 changed files with 105 additions and 14 deletions
+7 -3
View File
@@ -5,8 +5,8 @@ import asyncio
import copy
import pickle
from contextlib import contextmanager, suppress
from typing import (Any, AsyncGenerator, Dict, Iterator, List, Mapping,
Optional, Union, cast)
from typing import (Any, AsyncGenerator, Dict, Iterable, Iterator, List,
Mapping, Optional, Union, cast)
import cloudpickle
import psutil
@@ -404,9 +404,13 @@ class MQLLMEngineClient(EngineClient):
error_message="Unable to start RPC Server",
socket=socket)
async def abort(self, request_id: str):
async def abort(self, request_id: Union[str, Iterable[str]]):
"""Send an ABORT_REQUEST signal to the RPC Server"""
if not isinstance(request_id, str):
raise RuntimeError("Only single-request abort supported in"
" deprecated V0")
with suppress(MQClientClosedError):
await self._send_one_way_rpc_request(
request=RPCAbortRequest(request_id), socket=self.input_socket)