From 0164022c907014a27e81c514cd4dff6091904c2b Mon Sep 17 00:00:00 2001 From: Taneem Ibrahim Date: Sun, 26 Jul 2026 02:24:07 -0400 Subject: [PATCH] [CI] Fix speech correctness check rejecting improved WER (#49853) Signed-off-by: Taneem Ibrahim --- .../correctness/test_transcription_api_correctness.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/entrypoints/speech_to_text/correctness/test_transcription_api_correctness.py b/tests/entrypoints/speech_to_text/correctness/test_transcription_api_correctness.py index 62b1d36784..713fa48eee 100644 --- a/tests/entrypoints/speech_to_text/correctness/test_transcription_api_correctness.py +++ b/tests/entrypoints/speech_to_text/correctness/test_transcription_api_correctness.py @@ -356,7 +356,12 @@ def test_wer_correctness( print(f"Expected WER: {expected_wer}, Actual WER: {wer}") if expected_wer: - torch.testing.assert_close(wer, expected_wer, atol=1e-1, rtol=1e-2) + wer_atol, wer_rtol = 1e-1, 1e-2 + max_wer = expected_wer + wer_atol + wer_rtol * abs(expected_wer) + assert wer <= max_wer, ( + f"WER {wer:.6f} exceeds maximum allowed {max_wer:.6f} " + f"(baseline {expected_wer:.6f})" + ) # 14-22mins of 6 audio samples of total ~115 mins and just 37MB.