[Config] Retire get_global_server_args, and clear the deprecated flags that have a replacement (#38375)

This commit is contained in:
Cheng Wan
2026-09-08 16:42:12 -07:00
committed by GitHub
parent 5177a3ec08
commit db272201a2
213 changed files with 625 additions and 892 deletions
@@ -21,7 +21,7 @@ class TestQwen35FP4(CustomTestCase):
"4",
"--chunked-prefill-size",
"2048",
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"extra_buffer",
"--mamba-track-interval",
"128",
@@ -37,7 +37,7 @@ class TestQwen35FP4(CustomTestCase):
"4",
"--chunked-prefill-size",
"2048",
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"extra_buffer",
"--mamba-track-interval",
"128",
@@ -103,7 +103,7 @@ class TestQwen35FP4MTP(ReasoningTokenUsageMixin, CustomTestCase):
"4",
"--chunked-prefill-size",
"2048",
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"extra_buffer",
"--mamba-track-interval",
"128",
@@ -20,7 +20,7 @@ class TestQwen3Next(
"4",
"--chunked-prefill-size",
"1024",
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"extra_buffer",
"--mamba-track-interval",
"2",
@@ -45,7 +45,7 @@ class TestQwen3NextLazyExtraBuffer(
"4",
"--chunked-prefill-size",
"1024",
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"extra_buffer_lazy",
"--mamba-track-interval",
"2",
@@ -34,7 +34,7 @@ class TestQwen3NextMTP(GSM8KMixin, KLDivergenceMixin, DefaultServerBase):
"4",
"--chunked-prefill-size",
"2048",
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"no_buffer",
"--disable-radix-cache",
]
@@ -14,7 +14,7 @@ class TestChunkedFeatureHybridSWA(ChunkedTestBase):
feature_args = [
"--mem-fraction-static",
"0.70",
"--disable-piecewise-cuda-graph",
"--cuda-graph-backend-prefill=disabled",
]
-1
View File
@@ -73,7 +73,6 @@ class _BaseTestDynamicEPLB(CustomTestCase):
"--expert-distribution-recorder-buffer-size",
"50",
# TODO pr-chain: enable later
# "--enable-expert-distribution-metrics",
# TODO auto determine these flags
"--expert-distribution-recorder-mode",
"stat",
+3 -3
View File
@@ -14,7 +14,7 @@ without spec, then with spec) and runs four checks:
2. distinct — each adapter's output differs from base (LoRA really applied)
3. mixed — a batch interleaving every adapter matches the solo outputs
(crossed verify segments serve a request the wrong adapter)
4. eager — a batch wider than --cuda-graph-max-bs still matches
4. eager — a batch wider than --cuda-graph-max-bs-decode still matches
(exercises the non-cuda-graph target-verify path)
It also reports per-adapter accept length from each response's
@@ -99,7 +99,7 @@ CONFIGS = {
common_args=[
"--mem-fraction-static=0.7",
"--max-lora-rank=128",
"--cuda-graph-max-bs=2",
"--cuda-graph-max-bs-decode=2",
],
tp=1,
),
@@ -813,7 +813,7 @@ def main() -> int:
"--wide-batch",
type=int,
default=16,
help="batch size for the eager-path check; keep it above --cuda-graph-max-bs",
help="batch size for the eager-path check; keep it above --cuda-graph-max-bs-decode",
)
parser.add_argument(
"--lora-backend", help="override the config's LoRA kernel backend"
@@ -24,7 +24,7 @@ class TestGraniteMoeHybridExtraBuffer(
other_args = [
"--mem-fraction-static",
"0.8",
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"extra_buffer",
]
@@ -34,7 +34,7 @@ class TestNvidiaNemotronNanoV2BF16ExtraBuffer(
"256",
"--mem-fraction-static",
"0.8",
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"extra_buffer",
]
@@ -88,7 +88,7 @@ class TestNvidiaNemotronNanoV2SpeculativeDecodingExtraBuffer(
model = NVIDIA_NEMOTRON_NANO_V2_MODEL
gsm8k_accuracy_thres = 0.87
other_args = SPECULATIVE_DECODING_OTHER_ARGS + [
"--mamba-scheduler-strategy",
"--mamba-radix-cache-strategy",
"extra_buffer",
]
@@ -135,11 +135,11 @@ class TestVLMPiecewiseCudaGraph(CustomTestCase):
api_key=self.api_key,
other_args=[
"--trust-remote-code",
"--piecewise-cuda-graph-max-tokens",
"--cuda-graph-max-bs-prefill",
"8192",
"--enforce-piecewise-cuda-graph",
"--cuda-graph-backend-prefill=tc_piecewise",
"--tp=8",
"--piecewise-cuda-graph-compiler=eager",
"--cuda-graph-tc-compiler=eager",
"--disable-radix-cache",
"--log-level",
log_level,
@@ -140,14 +140,14 @@ class TestVLMViTCudaGraph(CustomTestCase):
other_args=[
"--mm-attention-backend",
"fa3",
"--enforce-piecewise-cuda-graph",
"--piecewise-cuda-graph-max-tokens",
"--cuda-graph-backend-prefill=tc_piecewise",
"--cuda-graph-max-bs-prefill",
"8192",
"--chunked-prefill-size",
"8192",
"--disable-radix-cache",
"--disable-overlap-schedule",
"--piecewise-cuda-graph-compiler",
"--cuda-graph-tc-compiler",
"eager",
],
env=process_env,
@@ -31,7 +31,7 @@ class TestPiecewiseCudaGraphInternVL25(CustomTestCase):
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--enforce-piecewise-cuda-graph",
"--cuda-graph-backend-prefill=tc_piecewise",
"--disable-radix-cache",
],
)
@@ -38,7 +38,7 @@ class TestDisaggregationPiecewiseCudaGraph(PDDisaggregationServerBase):
"prefill",
"--tp",
"1",
"--enforce-piecewise-cuda-graph",
"--cuda-graph-backend-prefill=tc_piecewise",
]
prefill_args += cls.transfer_backend + cls.rdma_devices
cls.process_prefill = popen_launch_pd_server(
@@ -41,12 +41,6 @@ class TestDSAChoicesAndFields(unittest.TestCase):
self.assertIn("tilelang", choices)
self.assertIn("flashinfer_sparse_mla", choices)
def test_nsa_choices_match_dsa_choices(self):
self.assertEqual(
self.actions["--nsa-prefill-backend"].choices,
self.actions["--dsa-prefill-backend"].choices,
)
def test_serverargs_has_dsa_fields(self):
sa = self.ServerArgs
self.assertTrue(hasattr(sa, "dsa_prefill_backend"))
@@ -94,63 +88,6 @@ class TestCLICanonicalFlags(unittest.TestCase):
args = self._parse(["--attention-backend", "dsa"])
self.assertEqual(args.attention_backend, "dsa")
class TestCLIDeprecatedFlags(unittest.TestCase):
"""Deprecated flags write to canonical attributes and emit logger warning."""
def setUp(self):
import logging
from sglang.srt.server_args import ServerArgs
self.parser = argparse.ArgumentParser()
ServerArgs.add_cli_args(self.parser)
# Capture log output to detect deprecation warnings
self.log_records = []
handler = (
logging.handlers_collector(self.log_records)
if hasattr(logging, "handlers_collector")
else None
)
def _parse(self, extra_args):
return self.parser.parse_args(["--model", "dummy"] + extra_args)
def _parse_capture_warnings(self, extra_args):
"""Parse and capture both warnings.warn and logger output."""
import io
import logging
log_stream = io.StringIO()
handler = logging.StreamHandler(log_stream)
handler.setLevel(logging.WARNING)
root = logging.getLogger()
root.addHandler(handler)
try:
args = self._parse(extra_args)
finally:
root.removeHandler(handler)
return args, log_stream.getvalue()
def test_nsa_prefill_backend_deprecated_writes_to_dsa(self):
args, log_output = self._parse_capture_warnings(
["--nsa-prefill-backend", "fa3"]
)
self.assertEqual(args.dsa_prefill_backend, "fa3")
self.assertIn(
"deprecated",
log_output.lower(),
f"Expected deprecation warning in log; got: {log_output!r}",
)
def test_nsa_decode_backend_deprecated_writes_to_dsa(self):
args, log_output = self._parse_capture_warnings(
["--nsa-decode-backend", "tilelang"]
)
self.assertEqual(args.dsa_decode_backend, "tilelang")
self.assertIn("deprecated", log_output.lower())
def test_attention_backend_nsa_still_accepted(self):
"""attention_backend='nsa' still parses without error (registry handles the deprecation)."""
args = self._parse(["--attention-backend", "nsa"])
+3 -3
View File
@@ -63,7 +63,7 @@ class TestDeepseekV3W4Afp8Mtp(CustomTestCase):
"--trust-remote-code",
"--ep-size",
"8",
"--cuda-graph-bs",
"--cuda-graph-bs-decode",
"256",
"--disable-radix-cache",
"--speculative-algorithm",
@@ -130,7 +130,7 @@ class TestDeepseekV3W4Afp8DeepepNormal(CustomTestCase):
"--trust-remote-code",
"--ep-size",
"8",
"--cuda-graph-bs",
"--cuda-graph-bs-decode",
"256",
"--disable-radix-cache",
"--moe-a2a-backend",
@@ -185,7 +185,7 @@ class TestDeepseekV3W4Afp8DeepepAutoMtp(CustomTestCase):
"--trust-remote-code",
"--ep-size",
"8",
"--cuda-graph-bs",
"--cuda-graph-bs-decode",
"256",
"--disable-radix-cache",
"--moe-a2a-backend",