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

fix flaky m2m100 test #10604

Merged
merged 1 commit into from Mar 9, 2021

Conversation

patil-suraj
Copy link
Contributor

What does this PR do?

The test_retain_grad_hidden_states_attentions test is sometimes failing for M2M100, with the error
AttributeError: 'NoneType' object has no attribute 'retain_grad'

This is because of layerdrop sometimes a layer is skipped and the encoder_attenion/decoder_attentions/cross_attentions can be None.

This PR sets the config.encoder_layerdrop and config.decoder_layerdrop to 0 in tests to make the tests deterministic.

@patrickvonplaten patrickvonplaten merged commit 20c1025 into huggingface:master Mar 9, 2021
@patil-suraj patil-suraj deleted the m2m100-flaky-test branch March 9, 2021 15:13
Iwontbecreative pushed a commit to Iwontbecreative/transformers that referenced this pull request Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants