[VITS] Fix nightly tests#25986
Merged
sanchit-gandhi merged 8 commits intohuggingface:mainfrom Sep 7, 2023
Merged
Conversation
added 2 commits
September 5, 2023 11:46
|
The documentation is not available anymore as the PR was closed or merged. |
added 3 commits
September 5, 2023 12:39
ydshieh
approved these changes
Sep 5, 2023
Collaborator
ydshieh
left a comment
There was a problem hiding this comment.
Thanks a lot. Just a few nits for the comments.
ArthurZucker
approved these changes
Sep 6, 2023
Collaborator
ArthurZucker
left a comment
There was a problem hiding this comment.
Thanks! The tokenizers integration tests should rather use k as padding as we discussed!
parambharat
pushed a commit
to parambharat/transformers
that referenced
this pull request
Sep 26, 2023
* fix tokenizer * make bs even * fix multi gpu test * style * model forward * fix torch import * revert tok pin
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.
What does this PR do?
Fixes the tokenizer integration test and multi-GPU test that failed on the nightly run: https://github.com/huggingface/transformers/actions/runs/6068405445/job/16461410319
The tokenizer fix is trivial (needed to update the commit ID)!
The multi-GPU test was failing because the output sequence length for VITS is a function of the model inputs, rather than being a function of the input sequence lengths only.
Let's say we have 2 GPUs over which we want to run DP:
N, which is computed based on the input in the first element of the batchxM, which is computed based on the input in the second element of the batchy=> there is nothing to enforce that
N = M, since the VITS output sequence length is a function of the inputs. Thus, we cannot concatenate the inputs after running the forward pass, since they have different dims.The fix for the test is to pass the same inputs to both GPUs, and disable the stochastic duration predictor. This way, we get consistent outputs across our GPUs.