[CI/Build] Fix Qwen3-Omni Talker benchmark workload (#8057)

Signed-off-by: psv666 <2693925048@qq.com>
This commit is contained in:
psv666 authored and GitHub committed 2026-09-24 23:56:53 +08:00
1 parent 0295eeb6f3
commit 2d00d86e5e
5 files changed
+214 -11

No files matched your search

+29
View File
@@ -1203,6 +1203,27 @@ def _update_output_stage_metrics_from_payload(
output.stage_metrics.update(stage_snapshot)
# Per-request stage fields persisted in benchmark results. Full snapshots carry
# per-token latency lists, which would inflate every chat-omni result file.
_REQUEST_STAGE_METRIC_FIELDS = (
defs.NUM_TOKENS_OUT,
"finish_reason",
defs.AUDIO_FRAMES,
f"{defs.AUDIO_DURATION}_s",
)
def _compact_request_stage_metrics(snapshot: object) -> dict[str, dict] | None:
"""Keep the stage fields used for workload checks; empty snapshots become None."""
if not isinstance(snapshot, dict) or not snapshot:
return None
return {
stage: {field: metrics[field] for field in _REQUEST_STAGE_METRIC_FIELDS if field in metrics}
for stage, metrics in snapshot.items()
if isinstance(metrics, dict)
}
def _apply_chat_stage0_token_timings(output: MixRequestFuncOutput) -> bool:
"""Apply native Stage 0 timings from a chat response snapshot."""
stage_metrics = output.stage_metrics
@@ -3635,6 +3656,14 @@ async def benchmark(
"input_lens": [output.prompt_len for output in outputs],
"errors": [output.error for output in outputs],
}
# Preserve request order, including missing snapshots, so CI can verify
# fixed stage workloads without parsing logs or storing audio payloads.
request_stage_metrics = [
_compact_request_stage_metrics(getattr(output, "stage_metrics", None)) for output in outputs
]
if any(request_stage_metrics):
result["request_stage_metrics"] = request_stage_metrics
# Plain-vLLM backends (e.g. the vLLM-text perf config) return upstream
# RequestFuncOutput objects without the Mix duplex fields; read them
# tolerantly or the whole benchmark result is discarded ("fallback to