Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for Whisper static pipeline #1250

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

eshiryae
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the category: GHA CI based on Github actions label Dec 2, 2024
@eshiryae eshiryae force-pushed the b_whisper_static_tests branch from a1bab59 to 48cb438 Compare December 2, 2024 11:36
@eshiryae
Copy link
Contributor Author

eshiryae commented Dec 4, 2024

With transformers 4.46.3 version encoder model have different dynamic shape for input_features, fix for StaticWhisperPipeline - PR #1293

@eshiryae eshiryae marked this pull request as ready for review December 4, 2024 12:01
@eshiryae eshiryae force-pushed the b_whisper_static_tests branch from e697a90 to 3bab16c Compare December 5, 2024 08:04
.github/labeler.yml Outdated Show resolved Hide resolved
.github/workflows/linux.yml Outdated Show resolved Hide resolved
.github/workflows/linux.yml Outdated Show resolved Hide resolved
tests/python_tests/test_whisper_pipeline_static.py Outdated Show resolved Hide resolved
tests/python_tests/test_whisper_pipeline_static.py Outdated Show resolved Hide resolved
@pytest.mark.parametrize("model_descr", get_whisper_models_list(tiny_only=True))
@pytest.mark.parametrize("test_sample",
[
# *get_samples_from_dataset(language="fr", length=2), # 1/2 failed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is failed? Do we have ticket for this?

Copy link
Contributor Author

@eshiryae eshiryae Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For one test (with Spanish language), there's mismatch between expected and actual output (looks like language is not detected correctly)

expected: Habritan aguas poco profundas y lo cosas.

actual_out: Habt ihr da noch was poco perfundes und lohosen?

For one test (with French language), there's an error:

RuntimeError: Check '*roi_end <= *max_dim' failed at src\inference\src\dev\make_tensor.cpp:34

I will create tickets for found fails.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same issue as in ticket with difference between NPU and CPU outputs.
With fix #1469 - not reproduced.

@eshiryae eshiryae force-pushed the b_whisper_static_tests branch 2 times, most recently from 2fdac12 to 0e11d54 Compare December 13, 2024 14:43
Copy link
Collaborator

@TolyaTalamanov TolyaTalamanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like everything can be covered by test_static_whisper_generation_compare_with_cpu with different inputs (@pytest.mark.parametrize)

"test_sample", get_samples_from_dataset(language="de", length=3)
)
@pytest.mark.precommit
def test_static_whisper_language_de(model_descr, test_sample):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it actually check? How it's different from test_static_whisper_autodetect?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we explicitly set language in config, in test_static_whisper_autodetect at first additional infer request will be called to detect language of the audio.

"test_sample", get_samples_from_dataset(language="fr", length=3)
)
@pytest.mark.precommit
def test_static_whisper_language_fr(model_descr, test_sample):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question, how it's different from test_static_whisper_autodetect

@eshiryae eshiryae force-pushed the b_whisper_static_tests branch 2 times, most recently from 3482704 to 09e1a99 Compare January 7, 2025 11:51
@eshiryae
Copy link
Contributor Author

eshiryae commented Jan 7, 2025

Tested locally, all 17 tests passed with changes from #1469

@eshiryae
Copy link
Contributor Author

eshiryae commented Jan 7, 2025

It seems like everything can be covered by test_static_whisper_generation_compare_with_cpu with different inputs (@pytest.mark.parametrize)

Agree, tests code is similar. But decided to separate them as they cover different cases/functionality of static whisper pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants