Skip to content

Commit

Permalink
Setting shutdown asyncio event in a thread-safe manner (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
oandreeva-nv authored Dec 20, 2024
1 parent cd4cf06 commit 7348662
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ci/L0_backend_vllm/metrics_test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ run_test() {
fi
fi

set -e

# TODO: Non-graceful shutdown when metrics are enabled.
kill $SERVER_PID
wait $SERVER_PID

set -e
}

RET=0
Expand Down
2 changes: 1 addition & 1 deletion src/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def _check_health(self, requests):

def finalize(self):
self.logger.log_info("[vllm] Issuing finalize to vllm backend")
self._llm_engine_shutdown_event.set()
self._event_loop.call_soon_threadsafe(self._llm_engine_shutdown_event.set)

# Shutdown the event thread.
if self._event_thread is not None:
Expand Down

0 comments on commit 7348662

Please sign in to comment.