[CI] Wait for a killed test server's GPU memory before the next launch (#39545)

This commit is contained in:
Liangsheng Yin
2026-09-14 23:24:37 -07:00
committed by GitHub
parent e687b8d6af
commit 860fa83a9f
11 changed files with 201 additions and 197 deletions
+4 -4
View File
@@ -3,7 +3,6 @@ from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.run_eval import run_eval
from sglang.test.send_one import BenchArgs, send_one_prompt
@@ -13,6 +12,7 @@ from sglang.test.test_utils import (
DEFAULT_URL_FOR_TEST,
CustomTestCase,
popen_launch_server,
terminate_and_kill_process_tree,
)
register_cuda_ci(est_time=569, stage="extra-b", runner_config="8-gpu-h200")
@@ -63,7 +63,7 @@ class TestDeepseek(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -132,7 +132,7 @@ class TestDeepseekMTP(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -190,7 +190,7 @@ class TestDeepseekV32TBO(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_a_gsm8k(
self,
+10 -86
View File
@@ -4,7 +4,6 @@ from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
@@ -14,6 +13,7 @@ from sglang.test.test_utils import (
DEFAULT_URL_FOR_TEST,
CustomTestCase,
popen_launch_server,
terminate_and_kill_process_tree,
)
register_cuda_ci(est_time=407, stage="base-c", runner_config="4-gpu-h100")
@@ -30,10 +30,10 @@ class TestPureDP(CustomTestCase):
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--trust-remote-code",
"--tp",
"--tp-size",
"4",
"--enable-dp-attention",
"--dp",
"--dp-size",
"4",
"--moe-a2a-backend",
"deepep",
@@ -48,7 +48,7 @@ class TestPureDP(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -77,7 +77,7 @@ class TestTP(CustomTestCase):
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--trust-remote-code",
"--tp",
"--tp-size",
"4",
"--moe-a2a-backend",
"deepep",
@@ -90,7 +90,7 @@ class TestTP(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -119,10 +119,10 @@ class TestTBO(CustomTestCase):
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--trust-remote-code",
"--tp",
"--tp-size",
"4",
"--enable-dp-attention",
"--dp",
"--dp-size",
"4",
"--moe-dense-tp-size",
"1",
@@ -142,7 +142,7 @@ class TestTBO(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -205,83 +205,7 @@ class TestMTPWithTBO(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
def test_gsm8k(self):
args = SimpleNamespace(
base_url=self.base_url,
model=self.model,
eval_name="gsm8k",
api="completion",
max_tokens=512,
num_examples=200,
num_threads=128,
)
metrics = run_eval(args)
print(metrics)
self.assertGreater(metrics["score"], 0.60)
server_info = requests.get(self.base_url + "/server_info")
avg_spec_accept_length = server_info.json()["internal_states"][0][
"avg_spec_accept_length"
]
print(
f"###test_gsm8k (deepseek-v3 mtp + dp + tbo):\n"
f"accuracy={metrics['score']=:.3f}\n"
f"{avg_spec_accept_length=:.3f}\n"
)
self.assertGreater(avg_spec_accept_length, 2.1)
@unittest.skip("skipped due to bug when using MTP & TBO & attn_tp_size > 1")
class TestMTPWithTPAttnAndTBO(CustomTestCase):
@classmethod
def setUpClass(cls):
cls.model = DEFAULT_MODEL_NAME_FOR_TEST_MLA
cls.base_url = DEFAULT_URL_FOR_TEST
cls.process = popen_launch_server(
cls.model,
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--tp-size",
"4",
"--moe-dense-tp-size",
"1",
"--enable-two-batch-overlap",
"--moe-a2a-backend",
"deepep",
"--trust-remote-code",
"--speculative-algorithm",
"EAGLE",
"--speculative-num-steps",
"2",
"--speculative-eagle-topk",
"3",
"--speculative-num-draft-tokens",
"3",
"--speculative-draft-model-path",
DEFAULT_MODEL_NAME_FOR_TEST_MLA_NEXTN,
"--chunked-prefill-size",
"256",
"--cuda-graph-max-bs-decode",
"32",
"--max-running-requests",
"128",
"--mem-fraction-static", # temp fix as DeepEP buffer is too large.
"0.7",
],
env={
**os.environ,
"SGLANG_TBO_DEBUG": "1",
},
)
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -2,7 +2,6 @@ import os
import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
@@ -11,6 +10,7 @@ from sglang.test.test_utils import (
DEFAULT_URL_FOR_TEST,
CustomTestCase,
popen_launch_server,
terminate_and_kill_process_tree,
)
register_cuda_ci(est_time=283, stage="extra-b", runner_config="4-gpu-h100")
@@ -43,7 +43,7 @@ class TestHybridDPTP(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -92,7 +92,7 @@ class TestTBOWithTPAttn(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -145,7 +145,7 @@ class TestTBOWithTPAttnAndDenseDP(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
+2 -2
View File
@@ -11,7 +11,6 @@ degrades output instead of failing.
import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
@@ -20,6 +19,7 @@ from sglang.test.test_utils import (
DEFAULT_URL_FOR_TEST,
CustomTestCase,
popen_launch_server,
terminate_and_kill_process_tree,
try_cached_model,
)
@@ -72,7 +72,7 @@ class TestEPLBNoA2A(CustomTestCase):
@classmethod
def tearDownClass(cls):
if hasattr(cls, "process") and cls.process:
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
+4 -4
View File
@@ -3,7 +3,6 @@ from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
@@ -11,6 +10,7 @@ from sglang.test.test_utils import (
DEFAULT_URL_FOR_TEST,
CustomTestCase,
popen_launch_server,
terminate_and_kill_process_tree,
)
register_cuda_ci(est_time=561, stage="base-c", runner_config="4-gpu-gb300")
@@ -63,7 +63,7 @@ class TestFlashinferA2ATrtllmRoutedFP4(CustomTestCase):
@classmethod
def tearDownClass(cls):
if hasattr(cls, "process") and cls.process:
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -126,7 +126,7 @@ class TestFlashinferA2ACutedslStaticFP4(CustomTestCase):
@classmethod
def tearDownClass(cls):
if hasattr(cls, "process") and cls.process:
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_generate(self):
response = requests.post(
@@ -179,7 +179,7 @@ class TestFlashinferA2ATrtllmRoutedFP8(CustomTestCase):
@classmethod
def tearDownClass(cls):
if hasattr(cls, "process") and cls.process:
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
+2 -2
View File
@@ -4,7 +4,6 @@ from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.run_eval import run_eval
from sglang.test.server_fixtures.disaggregation_fixture import get_rdma_devices_args
@@ -15,6 +14,7 @@ from sglang.test.test_utils import (
CustomTestCase,
is_in_ci,
popen_launch_server,
terminate_and_kill_process_tree,
try_cached_model,
)
@@ -73,7 +73,7 @@ class TestTP(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(
@@ -10,13 +10,13 @@ import pybase64
import requests
import torch
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.test_utils import (
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
DEFAULT_URL_FOR_TEST,
CustomTestCase,
popen_launch_server,
terminate_and_kill_process_tree,
)
register_cuda_ci(est_time=72, stage="base-c", runner_config="4-gpu-h100")
@@ -102,7 +102,7 @@ class _ReadbackMixin:
@classmethod
def tearDownClass(cls):
if getattr(cls, "process", None):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def _one_request(self, i: int):
resp = requests.post(
@@ -2,7 +2,6 @@ import os
import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
@@ -10,6 +9,7 @@ from sglang.test.test_utils import (
DEFAULT_URL_FOR_TEST,
CustomTestCase,
popen_launch_server,
terminate_and_kill_process_tree,
)
register_cuda_ci(est_time=253, stage="extra-b", runner_config="8-gpu-h200")
@@ -51,7 +51,7 @@ class TestTBOWithSharedExpertsFusion(CustomTestCase):
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
terminate_and_kill_process_tree(cls.process)
def test_gsm8k(self):
args = SimpleNamespace(