[CI] Append test variant name to markdown report header in nightly test (#16166)
This commit is contained in:
@@ -87,7 +87,9 @@ Note: To view the traces through perfetto-ui, please:
|
|||||||
return f"| {self.batch_size} | {self.input_len} | {self.latency:.2f} | {self.input_throughput:.2f} | {self.output_throughput:.2f} | {accept_length} | {itl:.2f} | {input_cost:.2f} | {output_cost:.2f} | {profile_link} |\n"
|
return f"| {self.batch_size} | {self.input_len} | {self.latency:.2f} | {self.input_throughput:.2f} | {self.output_throughput:.2f} | {accept_length} | {itl:.2f} | {input_cost:.2f} | {output_cost:.2f} | {profile_link} |\n"
|
||||||
|
|
||||||
|
|
||||||
def generate_markdown_report(trace_dir, results: List[BenchmarkResult]) -> str:
|
def generate_markdown_report(
|
||||||
|
trace_dir, results: List[BenchmarkResult], variant: Optional[str] = None
|
||||||
|
) -> str:
|
||||||
"""Generate a markdown report from a list of BenchmarkResult object from a single run."""
|
"""Generate a markdown report from a list of BenchmarkResult object from a single run."""
|
||||||
# Build model header with run_name if it's not "default"
|
# Build model header with run_name if it's not "default"
|
||||||
model_header = results[0].model_path
|
model_header = results[0].model_path
|
||||||
@@ -99,6 +101,9 @@ def generate_markdown_report(trace_dir, results: List[BenchmarkResult]) -> str:
|
|||||||
if gpu_config:
|
if gpu_config:
|
||||||
model_header += f" [{gpu_config}]"
|
model_header += f" [{gpu_config}]"
|
||||||
|
|
||||||
|
if variant:
|
||||||
|
model_header += f" ({variant})"
|
||||||
|
|
||||||
summary = f"### {model_header}\n"
|
summary = f"### {model_header}\n"
|
||||||
|
|
||||||
summary += "| batch size | input len | latency (s) | input throughput (tok/s) | output throughput (tok/s) | acc length | ITL (ms) | input cost ($/1M) | output cost ($/1M) | profile (extend) | profile (decode)|\n"
|
summary += "| batch size | input len | latency (s) | input throughput (tok/s) | output throughput (tok/s) | acc length | ITL (ms) | input cost ($/1M) | output cost ($/1M) | profile (extend) | profile (decode)|\n"
|
||||||
|
|||||||
@@ -309,14 +309,16 @@ class NightlyBenchmarkRunner:
|
|||||||
print(f" Warning: Could not fetch spec accept length: {e}")
|
print(f" Warning: Could not fetch spec accept length: {e}")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def add_report(self, results: List[BenchmarkResult]) -> None:
|
def add_report(
|
||||||
|
self, results: List[BenchmarkResult], variant: Optional[str] = None
|
||||||
|
) -> None:
|
||||||
"""Add benchmark results to the full report.
|
"""Add benchmark results to the full report.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
results: List of BenchmarkResult objects to add to report
|
results: List of BenchmarkResult objects to add to report
|
||||||
"""
|
"""
|
||||||
if results:
|
if results:
|
||||||
report_part = generate_markdown_report(self.profile_dir, results)
|
report_part = generate_markdown_report(self.profile_dir, results, variant)
|
||||||
self.full_report += report_part + "\n"
|
self.full_report += report_part + "\n"
|
||||||
|
|
||||||
def write_final_report(self) -> None:
|
def write_final_report(self) -> None:
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ def run_performance_test(
|
|||||||
|
|
||||||
print(f"\n{'='*60}")
|
print(f"\n{'='*60}")
|
||||||
print(f"Running PERFORMANCE test for {model.model_path}")
|
print(f"Running PERFORMANCE test for {model.model_path}")
|
||||||
|
print(f" Variant: {model.variant}")
|
||||||
print(f" Batch sizes: {batch_sizes}")
|
print(f" Batch sizes: {batch_sizes}")
|
||||||
print(f" Input lens: {input_lens}")
|
print(f" Input lens: {input_lens}")
|
||||||
print(f" Output lens: {output_lens}")
|
print(f" Output lens: {output_lens}")
|
||||||
@@ -80,7 +81,7 @@ def run_performance_test(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if success and results:
|
if success and results:
|
||||||
perf_runner.add_report(results)
|
perf_runner.add_report(results, variant=model.variant)
|
||||||
print(f"✓ Performance test succeeded for {model.model_path}")
|
print(f"✓ Performance test succeeded for {model.model_path}")
|
||||||
|
|
||||||
# Validate speculative decoding accept length if threshold is set
|
# Validate speculative decoding accept length if threshold is set
|
||||||
|
|||||||
@@ -1767,11 +1767,13 @@ class ModelLaunchSettings:
|
|||||||
tp_size: int = 1,
|
tp_size: int = 1,
|
||||||
extra_args: Optional[List[str]] = None,
|
extra_args: Optional[List[str]] = None,
|
||||||
env: Optional[dict] = None,
|
env: Optional[dict] = None,
|
||||||
|
variant: Optional[str] = None,
|
||||||
):
|
):
|
||||||
self.model_path = model_path
|
self.model_path = model_path
|
||||||
self.tp_size = tp_size
|
self.tp_size = tp_size
|
||||||
self.extra_args = list(extra_args) if extra_args else []
|
self.extra_args = list(extra_args) if extra_args else []
|
||||||
self.env = env
|
self.env = env
|
||||||
|
self.variant = variant
|
||||||
|
|
||||||
if self.tp_size > 1 and "--tp" not in self.extra_args:
|
if self.tp_size > 1 and "--tp" not in self.extra_args:
|
||||||
self.extra_args.extend(["--tp", str(self.tp_size)])
|
self.extra_args.extend(["--tp", str(self.tp_size)])
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class TestNightlyDeepseekV31Performance(unittest.TestCase):
|
|||||||
if not success:
|
if not success:
|
||||||
failed_variants.append(variant_config["name"])
|
failed_variants.append(variant_config["name"])
|
||||||
|
|
||||||
self.runner.add_report(results)
|
self.runner.add_report(results, variant=variant_config["name"])
|
||||||
finally:
|
finally:
|
||||||
self.runner.write_final_report()
|
self.runner.write_final_report()
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class TestNightlyDeepseekV32Performance(unittest.TestCase):
|
|||||||
if not success:
|
if not success:
|
||||||
failed_variants.append(variant_config["name"])
|
failed_variants.append(variant_config["name"])
|
||||||
|
|
||||||
self.runner.add_report(results)
|
self.runner.add_report(results, variant=variant_config["name"])
|
||||||
finally:
|
finally:
|
||||||
self.runner.write_final_report()
|
self.runner.write_final_report()
|
||||||
|
|
||||||
|
|||||||
@@ -48,12 +48,14 @@ class TestDeepseekV31Unified(unittest.TestCase):
|
|||||||
DEEPSEEK_V31_MODEL_PATH,
|
DEEPSEEK_V31_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args,
|
extra_args=base_args,
|
||||||
|
variant="TP8",
|
||||||
),
|
),
|
||||||
# Variant: "mtp" - TP=8 + EAGLE speculative decoding
|
# Variant: "mtp" - TP=8 + EAGLE speculative decoding
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
DEEPSEEK_V31_MODEL_PATH,
|
DEEPSEEK_V31_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args + mtp_args,
|
extra_args=base_args + mtp_args,
|
||||||
|
variant="TP8+MTP",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -55,24 +55,28 @@ class TestDeepseekV32Unified(unittest.TestCase):
|
|||||||
DEEPSEEK_V32_MODEL_PATH,
|
DEEPSEEK_V32_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=BASE_ARGS + DP_ARGS,
|
extra_args=BASE_ARGS + DP_ARGS,
|
||||||
|
variant="DP8",
|
||||||
),
|
),
|
||||||
# Variant: "dp+mtp" - DP + EAGLE speculative decoding
|
# Variant: "dp+mtp" - DP + EAGLE speculative decoding
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
DEEPSEEK_V32_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=BASE_ARGS + DP_ARGS + MTP_ARGS,
|
extra_args=BASE_ARGS + DP_ARGS + MTP_ARGS,
|
||||||
|
variant="DP8+MTP",
|
||||||
),
|
),
|
||||||
# Variant: "tp" - Pure TP=8 only
|
# Variant: "tp" - Pure TP=8 only
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
DEEPSEEK_V32_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=BASE_ARGS + TP_ARGS,
|
extra_args=BASE_ARGS + TP_ARGS,
|
||||||
|
variant="TP8",
|
||||||
),
|
),
|
||||||
# Variant: "tp+mtp" - Pure TP=8 + EAGLE speculative decoding
|
# Variant: "tp+mtp" - Pure TP=8 + EAGLE speculative decoding
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
DEEPSEEK_V32_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=BASE_ARGS + TP_ARGS + MTP_ARGS,
|
extra_args=BASE_ARGS + TP_ARGS + MTP_ARGS,
|
||||||
|
variant="TP8+MTP",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class TestGLM46Unified(unittest.TestCase):
|
|||||||
GLM_4_6_MODEL_PATH,
|
GLM_4_6_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args,
|
extra_args=base_args,
|
||||||
|
variant="TP8",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -39,11 +39,13 @@ class TestGLM46FP8Unified(unittest.TestCase):
|
|||||||
GLM_4_6_FP8_MODEL_PATH,
|
GLM_4_6_FP8_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args,
|
extra_args=base_args,
|
||||||
|
variant="TP8",
|
||||||
),
|
),
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
GLM_4_6_FP8_MODEL_PATH,
|
GLM_4_6_FP8_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args + mtp_args,
|
extra_args=base_args + mtp_args,
|
||||||
|
variant="TP8+MTP",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class TestKimiK2Unified(unittest.TestCase):
|
|||||||
KIMI_K2_THINKING_MODEL_PATH,
|
KIMI_K2_THINKING_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args,
|
extra_args=base_args,
|
||||||
|
variant="TP8",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class TestMiniMaxM2Unified(unittest.TestCase):
|
|||||||
MINIMAX_M2_MODEL_PATH,
|
MINIMAX_M2_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args,
|
extra_args=base_args,
|
||||||
|
variant="TP8+EP8",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -63,12 +63,14 @@ class TestMistralLarge3Unified(unittest.TestCase):
|
|||||||
MISTRAL_LARGE3_MODEL_PATH,
|
MISTRAL_LARGE3_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args,
|
extra_args=base_args,
|
||||||
|
variant="TP8",
|
||||||
),
|
),
|
||||||
# Variant: "eagle" - TP=8 + trtllm_mla + EAGLE with draft model
|
# Variant: "eagle" - TP=8 + trtllm_mla + EAGLE with draft model
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
MISTRAL_LARGE3_MODEL_PATH,
|
MISTRAL_LARGE3_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args + eagle_args,
|
extra_args=base_args + eagle_args,
|
||||||
|
variant="TP8+MTP",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class TestQwen3235BUnified(unittest.TestCase):
|
|||||||
QWEN3_235B_MODEL_PATH,
|
QWEN3_235B_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=base_args,
|
extra_args=base_args,
|
||||||
|
variant="TP8",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user