Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions scripts/ci/utils/diffusion/generate_diffusion_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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 |"
Expand Down Expand Up @@ -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 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,
)

filename = f"latency_{_sanitize_filename(cid)}.png"
chart_path = os.path.join(charts_dir, filename)
Expand Down
Loading