[CI][Bugfix] Compute WER with jiwer directly in transcription tests#49801
[CI][Bugfix] Compute WER with jiwer directly in transcription tests#49801mosya415 wants to merge 1 commit into
Conversation
test_transcription_api_correctness computed WER via evaluate.load("wer"),
which downloads a metric loading script from the HF Hub on cache miss. With
evaluate==0.4.3 pinned against huggingface-hub==1.22.0 that download path
raises AttributeError: module 'huggingface_hub.hf_api' has no attribute
'HfFolder', because HfFolder was removed in huggingface-hub v1. The test then
fails whenever the metric script is not already cached in the CI image.
evaluate's wer metric is a thin wrapper over jiwer, which is already a pinned
test dependency (jiwer==3.0.5). Call jiwer.wer directly so WER is computed
locally with no network access and no dependency on the removed HfFolder API.
The score is unchanged, so the expected WER thresholds still hold.
Signed-off-by: mosya415 <263250241+mosya415@users.noreply.github.com>
|
cc @NickLucche, small CI fix for the transcription correctness tests, would appreciate a look and the
The fix computes WER with |
|
This seems to be a duplicate of #49773 . Could you please collaborate on the other PR instead? |
|
Thanks @taneem-ibrahim, you're right, #49773 predates this and takes the same approach. Closing this one as a duplicate. Happy to review or help over there. Thanks @Change72 for the fix. |
Purpose
test_transcription_api_correctnesscomputes WER throughevaluate.load("wer"), which fetches a metric loading script from the Hugging Face Hub whenever that script is not already cached in the CI image. On a cache miss that fetch runshf_api.HfFolder.get_token(), and with the pinned pairevaluate==0.4.3andhuggingface-hub==1.22.0it raisesAttributeError: module 'huggingface_hub.hf_api' has no attribute 'HfFolder', becauseHfFolderwas removed in huggingface-hub v1. The three WER cases then fail even though the served transcriptions are fine, which makes the Speech to Text job flaky depending on the image cache state.This was observed in build 80058, job Entrypoints Integration (Speech to Text): https://buildkite.com/vllm/ci/builds/80058#019f957e-48fa-49fd-a234-4bb51424b41e where
test_wer_correctnessandtest_long_audio_wer_correctnessfailed with thatHfFoldererror while every non-WER speech case passed.The fix removes the network path entirely.
evaluate'swermetric is a thin wrapper overjiwer, andjiwer==3.0.5is already a pinned test dependency, so WER is now computed in-process withjiwer.wer(reference=..., hypothesis=...). The numeric result is the same, so the expected WER thresholds in the test are unaffected.Not a duplicate
No open issue or PR addresses this. I searched vLLM issues and PRs for
HfFolder, forwerplusHfFolder, and for open work touchingtest_transcription_api_correctness, and found only the already merged reliability change #23854, which is orthogonal.Test Plan
Run the transcription correctness tests, which now compute WER locally with no Hub access:
Test Result
Locally verified against
jiwer==3.0.5thatjiwer.weraccepts thereferenceandhypothesislists this test passes and returns the same fractional WER thatevaluate's wrapper produced, so the pinned thresholds stay valid.py_compileand the import-order check pass on the changed file. The full GPU end to end job was not rerun for this test-only change, since it requires the CI hardware and datasets.Model Evaluation
Not applicable. This changes how a test computes a metric and does not touch model behavior or serving.