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

Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
This commit is contained in:
Taneem Ibrahim
2026-07-26 06:24:07 +00:00
committed by GitHub
parent 30b0714031
commit 0164022c90
@@ -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.