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

Add a watch dog thread (#1816)

parent 1be853ee
...@@ -25,7 +25,7 @@ class TestMLA(unittest.TestCase): ...@@ -25,7 +25,7 @@ class TestMLA(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def test_mmlu(self): def test_mmlu(self):
args = SimpleNamespace( args = SimpleNamespace(
......
...@@ -31,7 +31,7 @@ class TestMLA(unittest.TestCase): ...@@ -31,7 +31,7 @@ class TestMLA(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def test_mgsm_en(self): def test_mgsm_en(self):
args = SimpleNamespace( args = SimpleNamespace(
......
...@@ -35,7 +35,7 @@ class TestMoEEvalAccuracyLarge(unittest.TestCase): ...@@ -35,7 +35,7 @@ class TestMoEEvalAccuracyLarge(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def test_mmlu(self): def test_mmlu(self):
args = SimpleNamespace( args = SimpleNamespace(
......
...@@ -36,7 +36,7 @@ class TestEvalAccuracyLarge(unittest.TestCase): ...@@ -36,7 +36,7 @@ class TestEvalAccuracyLarge(unittest.TestCase):
def tearDown(self): def tearDown(self):
if self.process: if self.process:
kill_child_process(self.process.pid) kill_child_process(self.process.pid, include_self=True)
def launch_server(self, model, is_fp8, is_tp2): def launch_server(self, model, is_fp8, is_tp2):
other_args = ["--log-level-http", "warning", "--trust-remote-code"] other_args = ["--log-level-http", "warning", "--trust-remote-code"]
......
...@@ -31,7 +31,7 @@ class TestOpenAIServer(unittest.TestCase): ...@@ -31,7 +31,7 @@ class TestOpenAIServer(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def run_completion( def run_completion(
self, echo, logprobs, use_list_input, parallel_sample_num, token_input self, echo, logprobs, use_list_input, parallel_sample_num, token_input
......
...@@ -27,7 +27,7 @@ class TestPyTorchSamplingBackend(unittest.TestCase): ...@@ -27,7 +27,7 @@ class TestPyTorchSamplingBackend(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def test_mmlu(self): def test_mmlu(self):
args = SimpleNamespace( args = SimpleNamespace(
......
...@@ -22,7 +22,7 @@ class TestRetractDecode(unittest.TestCase): ...@@ -22,7 +22,7 @@ class TestRetractDecode(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def test_mmlu(self): def test_mmlu(self):
args = SimpleNamespace( args = SimpleNamespace(
......
...@@ -26,7 +26,7 @@ class TestSkipTokenizerInit(unittest.TestCase): ...@@ -26,7 +26,7 @@ class TestSkipTokenizerInit(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def run_decode(self, return_logprob=False, top_logprobs_num=0, n=1): def run_decode(self, return_logprob=False, top_logprobs_num=0, n=1):
max_new_tokens = 32 max_new_tokens = 32
......
...@@ -27,7 +27,7 @@ class TestSRTEndpoint(unittest.TestCase): ...@@ -27,7 +27,7 @@ class TestSRTEndpoint(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def run_decode( def run_decode(
self, self,
......
...@@ -27,7 +27,7 @@ class TestTorchCompile(unittest.TestCase): ...@@ -27,7 +27,7 @@ class TestTorchCompile(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def test_mmlu(self): def test_mmlu(self):
args = SimpleNamespace( args = SimpleNamespace(
......
...@@ -27,7 +27,7 @@ class TestTorchCompile(unittest.TestCase): ...@@ -27,7 +27,7 @@ class TestTorchCompile(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def test_mmlu(self): def test_mmlu(self):
args = SimpleNamespace( args = SimpleNamespace(
......
...@@ -50,7 +50,7 @@ class TestTritonAttnBackend(unittest.TestCase): ...@@ -50,7 +50,7 @@ class TestTritonAttnBackend(unittest.TestCase):
metrics = run_eval(args) metrics = run_eval(args)
assert metrics["score"] >= 0.65 assert metrics["score"] >= 0.65
finally: finally:
kill_child_process(process.pid) kill_child_process(process.pid, include_self=True)
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -23,7 +23,7 @@ class TestUpdateWeights(unittest.TestCase): ...@@ -23,7 +23,7 @@ class TestUpdateWeights(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def run_decode(self): def run_decode(self):
response = requests.post( response = requests.post(
......
...@@ -45,7 +45,7 @@ class TestOpenAIVisionServer(unittest.TestCase): ...@@ -45,7 +45,7 @@ class TestOpenAIVisionServer(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
kill_child_process(cls.process.pid) kill_child_process(cls.process.pid, include_self=True)
def test_chat_completion(self): def test_chat_completion(self):
client = openai.Client(api_key=self.api_key, base_url=self.base_url) 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