From 39d42cbf7038498c9967f425784bd7feac0196bc Mon Sep 17 00:00:00 2001 From: Mick Date: Mon, 30 Mar 2026 11:49:54 +0800 Subject: [PATCH 1/2] [diffusion] Fix dashboard chart display issues 1. Extend history from 7 to 14 runs (~2 weeks of trend data) 2. Move legend from upper-right to lower-right to avoid overlapping data labels 3. Use data-range-based y-axis with 30% padding instead of bottom=0, so values aren't clustered at chart top Co-Authored-By: Claude Opus 4.6 --- .../diffusion/generate_diffusion_dashboard.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/ci/utils/diffusion/generate_diffusion_dashboard.py b/scripts/ci/utils/diffusion/generate_diffusion_dashboard.py index 183611ef044d..379732a1faf2 100644 --- a/scripts/ci/utils/diffusion/generate_diffusion_dashboard.py +++ b/scripts/ci/utils/diffusion/generate_diffusion_dashboard.py @@ -26,7 +26,7 @@ CI_DATA_REPO_NAME = "sglang-ci-data" CI_DATA_BRANCH = "main" HISTORY_PREFIX = "diffusion-comparisons" -MAX_HISTORY_RUNS = 7 +MAX_HISTORY_RUNS = 14 # Base URL for chart images pushed to sglang-ci-data CHARTS_RAW_BASE_URL = ( @@ -344,7 +344,7 @@ def generate_dashboard( # ---- Section 2: SGLang Performance Trend ---- if history: - lines.append("\n## SGLang Performance Trend (Last 7 Runs)\n") + lines.append(f"\n## SGLang Performance Trend (Last {len(history) + 1} Runs)\n") # Build header header = "| Date | Commit |" @@ -491,9 +491,16 @@ def _chart_label(run: dict) -> str: ax.set_xticklabels(labels, fontsize=7) ax.set_ylabel("Latency (s)") ax.set_title(f"Latency Trend -- {cid}", fontsize=11, fontweight="bold") - ax.legend(loc="upper right", fontsize=8) + ax.legend(loc="lower right", fontsize=8, framealpha=0.8) ax.grid(True, alpha=0.3) - ax.set_ylim(bottom=0) + all_vals = sg_vals + [v for v in vl_vals if v is not None] + y_min = min(all_vals) + y_max = max(all_vals) + y_range = y_max - y_min if y_max > y_min else y_max * 0.1 + ax.set_ylim( + bottom=max(0, y_min - y_range * 0.3), + top=y_max + y_range * 0.3, + ) filename = f"latency_{_sanitize_filename(cid)}.png" chart_path = os.path.join(charts_dir, filename) From 0c5620e6b142898b11d01ec4546015c5687fd9eb Mon Sep 17 00:00:00 2001 From: Mick Date: Mon, 30 Mar 2026 11:56:23 +0800 Subject: [PATCH 2/2] Update scripts/ci/utils/diffusion/generate_diffusion_dashboard.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- scripts/ci/utils/diffusion/generate_diffusion_dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/utils/diffusion/generate_diffusion_dashboard.py b/scripts/ci/utils/diffusion/generate_diffusion_dashboard.py index 379732a1faf2..bb223fbe6dde 100644 --- a/scripts/ci/utils/diffusion/generate_diffusion_dashboard.py +++ b/scripts/ci/utils/diffusion/generate_diffusion_dashboard.py @@ -496,7 +496,7 @@ def _chart_label(run: dict) -> str: all_vals = sg_vals + [v for v in vl_vals if v is not None] y_min = min(all_vals) y_max = max(all_vals) - y_range = y_max - y_min if y_max > y_min else y_max * 0.1 + y_range = y_max - y_min if y_max > y_min else max(y_max * 0.1, 0.1) ax.set_ylim( bottom=max(0, y_min - y_range * 0.3), top=y_max + y_range * 0.3,