Unverified Commit a4c402a7 authored by Nick Hill's avatar Nick Hill Committed by GitHub
Browse files

[BugFix] Avoid error traceback in logs when V1 `LLM` terminates (#13565)


Signed-off-by: default avatarNick Hill <nhill@redhat.com>
parent 550d97eb
...@@ -252,14 +252,18 @@ class SyncMPClient(MPClient): ...@@ -252,14 +252,18 @@ class SyncMPClient(MPClient):
outputs_queue = self.outputs_queue outputs_queue = self.outputs_queue
def process_outputs_socket(): def process_outputs_socket():
while True: try:
(frame, ) = output_socket.recv_multipart(copy=False) while True:
outputs = decoder.decode(frame.buffer) (frame, ) = output_socket.recv_multipart(copy=False)
if outputs.utility_output: outputs = decoder.decode(frame.buffer)
_process_utility_output(outputs.utility_output, if outputs.utility_output:
utility_results) _process_utility_output(outputs.utility_output,
else: utility_results)
outputs_queue.put_nowait(outputs) else:
outputs_queue.put_nowait(outputs)
except zmq.error.ContextTerminated:
# Expected when the class is GC'd / during process termination.
pass
# Process outputs from engine in separate thread. # Process outputs from engine in separate thread.
Thread(target=process_outputs_socket, daemon=True).start() Thread(target=process_outputs_socket, daemon=True).start()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment