chore: cleanup garbage code (#29770)

This commit is contained in:
Xiaoyu Zhang
2026-07-02 16:14:01 +08:00
committed by GitHub
parent 0ae76117ef
commit b276a9acee
55 changed files with 86 additions and 262 deletions
@@ -112,7 +112,7 @@ class TestRegressionBasic(ScriptedTestCase):
"dbdcdde245 mamba_pool_idx cleanup-skip is mamba-architecture-specific. "
"The shared test fixture does not configure a mamba model; running this "
"regression against the default transformer model would not exercise the "
"mamba NO_TOKEN cleanup path, so the body would be a pure smoke test "
"mamba NO_TOKEN cleanup path, so the body would be a check "
"with no real protection. Re-enable when a mamba fixture is wired in."
)
def test_mamba_chunked_resume_no_token(self):
+3 -3
View File
@@ -8,7 +8,7 @@ and contains one ``CustomTestCase`` subclass per recipe
Each subclass launches the server with the cookbook's exact flags and
runs two sgl-eval evaluations (https://github.com/sgl-project/sgl-eval):
- ``test_smoke_gsm8k`` — short, cheap GSM8K pass to verify the server
can produce coherent math answers at all (smoke gate).
can produce coherent math answers at all (sanity gate).
- ``test_aime25`` — full AIME25 accuracy run (heavy; 16 repeats default).
Cookbook reference:
@@ -19,7 +19,7 @@ These are MANUAL tests (not CI). ``sgl-eval`` must be on PATH.
Per-variant defaults (set on the Flash/Pro intermediate base classes):
Flash recipes -> AIME25 score threshold 0.93
Pro recipes -> AIME25 score threshold 0.95
GSM8K smoke threshold (0.93) is shared across Flash and Pro.
GSM8K sanity threshold (0.93) is shared across Flash and Pro.
AIME25 knobs (env vars):
DSV4_AIME25_NUM_REPEATS (default 16 -> --n-repeats)
@@ -30,7 +30,7 @@ AIME25 knobs (env vars):
DSV4_AIME25_SCORE_METRIC (default "score"; sgl-eval JSON key under "aggregate")
DSV4_AIME25_SCORE_THRESHOLD (default 0; >0 overrides per-variant default)
GSM8K smoke knobs (env vars):
GSM8K sanity knobs (env vars):
DSV4_GSM8K_NUM_EXAMPLES (default 50 -> --num-examples)
DSV4_GSM8K_N_REPEATS (default 1 -> --n-repeats)
DSV4_GSM8K_TEMPERATURE (default 0.6 -> --temperature)
@@ -20,7 +20,7 @@ class TestLing26Flash(GSM8KMixin, DefaultServerBase):
# Native 128K context (no YaRN) — avoids the
# SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN env-var dance and keeps the
# smoke test focused on the dispatcher / hybrid-attention path.
# coverage focused on the dispatcher / hybrid-attention path.
other_args = [
"--tp-size",
"4",
@@ -39,7 +39,7 @@ class MoriTransferEngineBase(PDDisaggregationServerBase):
raise unittest.SkipTest("torch.cuda is not available.")
if torch.cuda.device_count() < cls.required_gpus:
raise unittest.SkipTest(
f"MORI PD smoke test requires >= {cls.required_gpus} visible GPUs."
f"MORI PD check requires >= {cls.required_gpus} visible GPUs."
)
except Exception as e:
raise unittest.SkipTest(f"torch is not available/usable: {e}")
@@ -46,7 +46,7 @@ class NixlTransferEngineBase(PDDisaggregationServerBase):
raise unittest.SkipTest("torch.cuda is not available.")
if torch.cuda.device_count() < cls.required_gpus:
raise unittest.SkipTest(
f"NIXL PD smoke test requires >= {cls.required_gpus} visible GPUs."
f"NIXL PD check requires >= {cls.required_gpus} visible GPUs."
)
except unittest.SkipTest:
raise
+1 -1
View File
@@ -1,4 +1,4 @@
"""Stage-a basic sanity: small-but-broad server smoke that downstream
"""Stage-a basic sanity: small-but-broad server coverage that downstream
stages depend on. Multiple sanity-kit mixins driving one shared server,
covering protocol, decode correctness, scheduler stress, occupancy, and
hellaswag accuracy."""
@@ -302,7 +302,7 @@ def test_load_weights_from_remote_instance(
try:
key, value = param_queue.get(timeout=5)
results[key] = value
except Exception as e:
except Exception:
if all(not p.is_alive() for p in context.processes):
break
@@ -310,7 +310,7 @@ def test_load_weights_from_remote_instance(
try:
key, value = param_queue.get(timeout=5)
results[key] = value
except Exception as e:
except Exception:
if all(not p.is_alive() for p in context.processes):
break
@@ -18,7 +18,7 @@ _REQUEST_TIMEOUT = 60
"MUSA device not available",
)
class TestMusaDeepSeekV2LiteChatServerSmoke(DefaultServerBase):
"""MUSA LLM server smoke test: launch, health check, and non-empty generation."""
"""MUSA LLM server sanity check: launch, health check, and non-empty generation."""
model = os.getenv("SGLANG_MUSA_LLM_MODEL", "deepseek-ai/DeepSeek-V2-Lite-Chat")
served_model_name = "deepseek-v2-lite-chat"
@@ -112,7 +112,7 @@ class TestUnifiedDeepSeekV4FlashHiCache(UnifiedRadixTreeTestMixin, CustomTestCas
class TestUnifiedDeepSeekV4FlashHiCachePageFirstDirect(
TestUnifiedDeepSeekV4FlashHiCache
):
"""DeepSeek V4 Flash HiCache layout smoke: page_first_direct + direct."""
"""DeepSeek V4 Flash HiCache layout check: page_first_direct + direct."""
hicache_io_backend = "kernel"
hicache_mem_layout = "layer_first"
@@ -396,7 +396,8 @@ def init_process_sgl(
return response.json()
with ThreadPoolExecutor(32) as executor:
futures = [executor.submit(run_decode, 1000) for _ in range(32)]
for _ in range(32):
executor.submit(run_decode, 1000)
time.sleep(2)
# The last parameter is lm_head.weight, which is tied
@@ -573,7 +574,7 @@ def test_update_weights_from_distributed(
try:
key, value = param_queue.get(timeout=5)
results[key] = value
except Exception as e:
except Exception:
if all(not p.is_alive() for p in context.processes):
break
@@ -736,9 +736,7 @@ class TestScriptedRuntimeCore(ScriptedTestCase):
@staticmethod
def _script_empty_return(t: ScriptedContext):
if False:
yield
return
yield from ()
def test_failing_script_surfaces_and_session_survives(self):
with self.assertRaises(AssertionError) as ctx:
@@ -753,7 +751,7 @@ class TestScriptedRuntimeCore(ScriptedTestCase):
@staticmethod
def _script_minimal_ok(t: ScriptedContext):
r = t.start_req(prompt_len=_SHORT_PROMPT_LEN, max_new_tokens=2)
t.start_req(prompt_len=_SHORT_PROMPT_LEN, max_new_tokens=2)
yield
yield
@@ -280,7 +280,7 @@ class FullResponseUsageTestCase(unittest.TestCase):
metadata = RequestResponseMetadata(request_id=request.request_id)
async def empty_generator():
if False:
for _ in ():
yield None
response = asyncio.run(
@@ -3,7 +3,7 @@
Covers:
- mlx_q4 / mlx_q8 quantize fp16 weights to QuantizedLinear in-place
- active-memory drops after quantization
- smoke /generate still works post-quantize
- /generate still works post-quantize
- pre-quantized HF repos still load (regression guard for mlx_lm passthrough)
- mlx_q4 flag on an already-quantized model is a no-op (skip + log)
@@ -265,7 +265,7 @@ def _image_item(feature, grid_hws):
class TestGetImageFeatureWiring(CustomTestCase):
"""Forward-shape smoke test for get_image_feature.
"""Forward-shape coverage for get_image_feature.
Guards the production path (pixel concat -> vision tower -> projector) and
the precomputed-embedding passthrough so a future change to the wiring or