-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[Tests] Correct Wav2Vec2 & WavLM tests #15015
[Tests] Correct Wav2Vec2 & WavLM tests #15015
Conversation
@@ -556,18 +556,17 @@ def test_inference_ctc_robust_batched(self): | |||
@require_pyctcdecode | |||
@require_librosa | |||
def test_wav2vec2_with_lm(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't nicely load mp3 at the moment with datasets
-> let's just use a .wav
file for now
@@ -452,30 +451,9 @@ def _mock_init_weights(self, module): | |||
if hasattr(module, "masked_spec_embed") and module.masked_spec_embed is not None: | |||
module.masked_spec_embed.data.fill_(3) | |||
|
|||
# overwrite from test_modeling_common | |||
# as WavLM is not very precise | |||
@unittest.skip(reason="Feed forward chunking is not implemented for WavLM") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feed forward chunking is not even implemented by WavLM
@@ -544,8 +522,9 @@ def test_inference_large(self): | |||
) | |||
|
|||
EXPECTED_HIDDEN_STATES_SLICE = torch.tensor( | |||
[[[0.1612, 0.4314], [0.1690, 0.4344]], [[0.2086, 0.1396], [0.3014, 0.0903]]] | |||
[[[0.2122, 0.0500], [0.2118, 0.0563]], [[0.1353, 0.1818], [0.2453, 0.0595]]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this was incorrect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did it ever pass? If so, it would be nice to checkout an earlier commit on which it passed and check the difference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know what was going on here. I'm sure though that the checkpoint works correctly as the model gives great results when fine-tuning -> see: https://huggingface.co/patrickvonplaten/wavlm-libri-clean-100h-large (tested on dec 17th: https://huggingface.co/patrickvonplaten/wavlm-libri-clean-100h-large/commit/a1b7ace90561bafd37167ca73c72833ad345963f) and there hasn't been a model change in the checkpoint's repo since december 16th: https://huggingface.co/microsoft/wavlm-large/commit/38b04afdf061607fdccc24c4ca4e8c3ae339012f
So the checkpoint is fine. Really not sure what was/is going on with this test. Will monitor in the coming days
@@ -544,8 +522,9 @@ def test_inference_large(self): | |||
) | |||
|
|||
EXPECTED_HIDDEN_STATES_SLICE = torch.tensor( | |||
[[[0.1612, 0.4314], [0.1690, 0.4344]], [[0.2086, 0.1396], [0.3014, 0.0903]]] | |||
[[[0.2122, 0.0500], [0.2118, 0.0563]], [[0.1353, 0.1818], [0.2453, 0.0595]]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did it ever pass? If so, it would be nice to checkout an earlier commit on which it passed and check the difference
What does this PR do?
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.