Unverified Commit d4fc1a70 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

Crash the server correctly during error (#2231)

parent db674e3d
......@@ -4,7 +4,7 @@ from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_child_process
from sglang.srt.utils import kill_process_tree
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
DEFAULT_MODEL_NAME_FOR_TEST,
......@@ -28,7 +28,7 @@ class TestTorchCompile(unittest.TestCase):
@classmethod
def tearDownClass(cls):
kill_child_process(cls.process.pid, include_self=True)
kill_process_tree(cls.process.pid)
def test_mmlu(self):
args = SimpleNamespace(
......
......@@ -4,7 +4,7 @@ from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_child_process
from sglang.srt.utils import kill_process_tree
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
DEFAULT_SMALL_MOE_MODEL_NAME_FOR_TEST,
......@@ -28,7 +28,7 @@ class TestTorchCompile(unittest.TestCase):
@classmethod
def tearDownClass(cls):
kill_child_process(cls.process.pid, include_self=True)
kill_process_tree(cls.process.pid)
def test_mmlu(self):
args = SimpleNamespace(
......
......@@ -3,7 +3,7 @@ from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_child_process
from sglang.srt.utils import kill_process_tree
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
DEFAULT_MODEL_NAME_FOR_TEST,
......@@ -27,7 +27,7 @@ class TestTorchAO(unittest.TestCase):
@classmethod
def tearDownClass(cls):
kill_child_process(cls.process.pid, include_self=True)
kill_process_tree(cls.process.pid)
def test_mmlu(self):
args = SimpleNamespace(
......
......@@ -6,7 +6,7 @@ python3 -m unittest test_triton_attention_backend.TestTritonAttnBackend.test_mml
import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_child_process
from sglang.srt.utils import kill_process_tree
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
DEFAULT_MODEL_NAME_FOR_TEST,
......@@ -54,7 +54,7 @@ class TestTritonAttnBackend(unittest.TestCase):
metrics = run_eval(args)
self.assertGreaterEqual(metrics["score"], 0.65)
finally:
kill_child_process(process.pid, include_self=True)
kill_process_tree(process.pid)
if __name__ == "__main__":
......
......@@ -3,7 +3,7 @@ import unittest
import requests
from sglang.srt.utils import kill_child_process
from sglang.srt.utils import kill_process_tree
from sglang.test.test_utils import (
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
......@@ -23,7 +23,7 @@ class TestUpdateWeights(unittest.TestCase):
@classmethod
def tearDownClass(cls):
kill_child_process(cls.process.pid, include_self=True)
kill_process_tree(cls.process.pid)
def run_decode(self):
response = requests.post(
......
......@@ -17,7 +17,7 @@ import requests
from decord import VideoReader, cpu
from PIL import Image
from sglang.srt.utils import kill_child_process
from sglang.srt.utils import kill_process_tree
from sglang.test.test_utils import (
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
DEFAULT_URL_FOR_TEST,
......@@ -46,7 +46,7 @@ class TestOpenAIVisionServer(unittest.TestCase):
@classmethod
def tearDownClass(cls):
kill_child_process(cls.process.pid, include_self=True)
kill_process_tree(cls.process.pid)
def test_chat_completion(self):
client = openai.Client(api_key=self.api_key, base_url=self.base_url)
......@@ -387,7 +387,7 @@ class TestQWen2VLServerContextLengthIssue(unittest.TestCase):
@classmethod
def tearDownClass(cls):
kill_child_process(cls.process.pid, include_self=True)
kill_process_tree(cls.process.pid)
def test_chat_completion(self):
client = openai.Client(api_key=self.api_key, base_url=self.base_url)
......
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