From 89e389cf37aa72c656386bb972fbcd585edb058e Mon Sep 17 00:00:00 2001 From: Alicia <115451386+congw729@users.noreply.github.com> Date: Fri, 22 May 2026 17:29:45 +0800 Subject: [PATCH] [CI] Fix email bug & skip email distribution. (#3814) Signed-off-by: Alicia <115451386+congw729@users.noreply.github.com> --- .buildkite/test-nightly.yml | 2 +- tools/nightly/generate_nightly_perf_excel.py | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.buildkite/test-nightly.yml b/.buildkite/test-nightly.yml index ae93d2353..82e872581 100644 --- a/.buildkite/test-nightly.yml +++ b/.buildkite/test-nightly.yml @@ -1196,7 +1196,7 @@ steps: - nightly-diffusion-x2iat-performance-qwen-image-layered - nightly-diffusion-x2v-performance - nightly-testcase-statistics - if: build.env("NIGHTLY") == "1" + if: build.env("NIGHTLY") == "1" && build.env("EMAIL_DISTRIBUTION") == "1" commands: - pip install openpyxl - export DEFAULT_INPUT_DIR=tests/dfx/perf/results diff --git a/tools/nightly/generate_nightly_perf_excel.py b/tools/nightly/generate_nightly_perf_excel.py index e76dc4346..54c4b3f34 100644 --- a/tools/nightly/generate_nightly_perf_excel.py +++ b/tools/nightly/generate_nightly_perf_excel.py @@ -18,11 +18,13 @@ from openpyxl import Workbook from openpyxl.styles import PatternFill from openpyxl.utils import get_column_letter -from benchmarks.diffusion.backends import normalize_endpoint - LOGGER = logging.getLogger(__name__) GREY_BLOCK_FILL = PatternFill(start_color="D3D3D3", fill_type="solid") +LEGACY_BACKEND_ENDPOINT_ALIASES = { + "vllm-omni": "/v1/chat/completions", + "openai": "/v1/images/generations", +} # Diffusion sheet columns (Qwen-Image diffusion benchmark). # Per-stage latency metrics. Unpack from stage_durations_mean/p50/p99 dicts @@ -145,6 +147,20 @@ def _diffusion_group_key(record: dict[str, Any]) -> tuple[Any, ...]: return (record.get("test_name") or "",) +def normalize_endpoint(value: str) -> str: + """Normalize legacy backend aliases and endpoint paths for report rows.""" + endpoint = str(value).strip() + if not endpoint: + raise ValueError("endpoint must not be empty.") + endpoint = LEGACY_BACKEND_ENDPOINT_ALIASES.get( + endpoint, + LEGACY_BACKEND_ENDPOINT_ALIASES.get(endpoint.lstrip("/"), endpoint), + ) + if not endpoint.startswith("/"): + endpoint = f"/{endpoint}" + return endpoint + + def _load_summary_columns(script_dir: str) -> list[str]: """Load summary column names from a file next to this script; fallback to default if missing.""" path = os.path.join(script_dir, _COLUMNS_FILENAME)