[CI] Fix email bug & skip email distribution. (#3814)

Signed-off-by: Alicia <115451386+congw729@users.noreply.github.com>
This commit is contained in:
Alicia authored and GitHub committed 2026-05-22 17:29:45 +08:00
1 parent 90ed618b5a
commit 89e389cf37
2 files changed
+19 -3

No files matched your search

+1 -1
View File
@@ -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
+18 -2
View File
@@ -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)