[CI] Fix speech correctness check rejecting improved WER (#49853)

Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>

Taneem Ibrahim committed Jul 26, 2026 at 02:24 UTC 0164022c907014a27e81c514cd4dff6091904c2b
1 file changed +6 -1
tests/entrypoints/speech_to_text/correctness/test_transcription_api_correctness.py
+6 -1
@@ -356,7 +356,12 @@ def test_wer_correctness(
356 print(f"Expected WER: {expected_wer}, Actual WER: {wer}")
357
358 if expected_wer:
359 - torch.testing.assert_close(wer, expected_wer, atol=1e-1, rtol=1e-2)
359 + wer_atol, wer_rtol = 1e-1, 1e-2
360 + max_wer = expected_wer + wer_atol + wer_rtol * abs(expected_wer)
361 + assert wer <= max_wer, (
362 + f"WER {wer:.6f} exceeds maximum allowed {max_wer:.6f} "
363 + f"(baseline {expected_wer:.6f})"
364 + )
365
366
367 # 14-22mins of 6 audio samples of total ~115 mins and just 37MB.