[ BugFix ] Move zmq frontend to IPC instead of TCP (#7222)

This commit is contained in:
Robert Shaw
2024-08-07 16:24:56 +00:00
committed by GitHub
parent 0f7052bc7e
commit 564985729a
5 changed files with 29 additions and 22 deletions
+3 -3
View File
@@ -21,9 +21,9 @@ from vllm.transformers_utils.tokenizer_group import init_tokenizer_from_configs
class AsyncEngineRPCClient:
def __init__(self, port: int):
def __init__(self, rpc_path: str):
self.context = zmq.asyncio.Context()
self.path = f"tcp://localhost:{port}"
self.rpc_path = rpc_path
async def setup(self):
"""Setup the client before it starts sending server requests."""
@@ -58,7 +58,7 @@ class AsyncEngineRPCClient:
# to enable streaming.
socket = self.context.socket(zmq.constants.DEALER)
try:
socket.connect(self.path)
socket.connect(self.rpc_path)
yield socket
finally:
socket.close()