Fix whisper hook generate decorator arguments passing#2873
Merged
Wovchena merged 1 commit intoopenvinotoolkit:masterfrom Oct 21, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes incorrect argument passing in the Whisper hook's generate decorator and corrects the use case class reference for speech-to-text models. The changes address a bug where the generate method wrapper was explicitly declaring an attention_mask parameter instead of accepting all keyword arguments dynamically.
Key Changes:
- Corrected the import and usage of
UseCaseSpeech2Textinstead ofUseCaseTextToSpeechin speech-to-text model handling - Fixed the
my_generatewrapper function to properly forward all keyword arguments to the underlyinggeneratemethod
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/llm_bench/llm_bench_utils/ov_utils.py | Corrected import and class reference from UseCaseTextToSpeech to UseCaseSpeech2Text for proper speech-to-text model validation |
| tools/llm_bench/llm_bench_utils/hook_forward_whisper.py | Fixed my_generate wrapper to accept all keyword arguments instead of explicitly declaring attention_mask, ensuring proper argument forwarding |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
sbalandi
approved these changes
Oct 20, 2025
Collaborator
Author
|
build_jenkins |
3 tasks
Collaborator
|
I think the problem is in OV's Jenkins. We have a PR in a queue hanging for 20 hours. I'll contact @akladiev. But it's worth trying once more :) |
Collaborator
|
build_jenkins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix whisper hook generate decorator arguments passing
Transformer change introduced in: huggingface/transformers#35753 (4.54.1 release)
Tested with 4.53, 4.55 transformers
Ticket: 174921
Checklist: