Skip to content

Commit

Permalink
Fix entrypoints unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
s5u13b committed Feb 7, 2025
1 parent 75af824 commit 322862b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion llumnix/entrypoints/vllm/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def generate(self,
raise ValueError("Unsupported feature: multiple sequence decoding")
logger.info("entrypoints receive request {}".format(request_id))
# pylint: disable=unexpected-keyword-arg
results_generator = AsyncStream(request_id, cancel=partial(self.abort, verbose=False))
results_generator = AsyncStream(request_id, cancel=self.abort_request)
self.request_streams[request_id] = results_generator
server_info_copy = copy.deepcopy(self.server_info)

Expand Down Expand Up @@ -117,6 +117,10 @@ async def abort(self, request_id: str) -> None:
except ray.exceptions.RayActorError:
logger.warning("Manager is unavailable.")

def abort_request(self, request_id: str) -> None:
logger.info("Abort request: {}.".format(request_id))
self.manager.abort.remote(request_id)

async def is_ready(self) -> bool:
ready_status = await self.manager.is_ready.remote()
return ready_status
Expand Down

0 comments on commit 322862b

Please sign in to comment.