[CI] Append test variant name to markdown report header in nightly test (#16166)

This commit is contained in:
Baizhou Zhang
2025-12-31 00:09:24 +08:00
committed by GitHub
parent 733a0c1a37
commit f35b5da521
14 changed files with 30 additions and 6 deletions

View File

@@ -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"
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."""
# Build model header with run_name if it's not "default"
model_header = results[0].model_path
@@ -99,6 +101,9 @@ def generate_markdown_report(trace_dir, results: List[BenchmarkResult]) -> str:
if gpu_config:
model_header += f" [{gpu_config}]"
if variant:
model_header += f" ({variant})"
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"

View File

@@ -309,14 +309,16 @@ class NightlyBenchmarkRunner:
print(f" Warning: Could not fetch spec accept length: {e}")
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.
Args:
results: List of BenchmarkResult objects to add to report
"""
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"
def write_final_report(self) -> None:

View File

@@ -57,6 +57,7 @@ def run_performance_test(
print(f"\n{'='*60}")
print(f"Running PERFORMANCE test for {model.model_path}")
print(f" Variant: {model.variant}")
print(f" Batch sizes: {batch_sizes}")
print(f" Input lens: {input_lens}")
print(f" Output lens: {output_lens}")
@@ -80,7 +81,7 @@ def run_performance_test(
)
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}")
# Validate speculative decoding accept length if threshold is set

View File

@@ -1767,11 +1767,13 @@ class ModelLaunchSettings:
tp_size: int = 1,
extra_args: Optional[List[str]] = None,
env: Optional[dict] = None,
variant: Optional[str] = None,
):
self.model_path = model_path
self.tp_size = tp_size
self.extra_args = list(extra_args) if extra_args else []
self.env = env
self.variant = variant
if self.tp_size > 1 and "--tp" not in self.extra_args:
self.extra_args.extend(["--tp", str(self.tp_size)])