From 032f8faaab47f6e07a390b1986aece9d43f6d1ad Mon Sep 17 00:00:00 2001 From: SEPLOS Date: Mon, 31 Mar 2025 04:00:24 +0800 Subject: [PATCH] Fix sglang frontend's incorrect dependency on torch (#4931) --- python/sglang/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/utils.py b/python/sglang/utils.py index bd5acd43d..e817c5b58 100644 --- a/python/sglang/utils.py +++ b/python/sglang/utils.py @@ -25,8 +25,6 @@ from IPython.display import HTML, display from pydantic import BaseModel from tqdm import tqdm -from sglang.srt.utils import kill_process_tree - logger = logging.getLogger(__name__) @@ -422,6 +420,8 @@ def terminate_process(process): """ Terminate the process and automatically release the reserved port. """ + from sglang.srt.utils import kill_process_tree + kill_process_tree(process.pid) lock_socket = process_socket_map.pop(process, None)