Skip to content

Set seed for M4T retain grad test#31419

Merged
ylacombe merged 1 commit intohuggingface:mainfrom
ylacombe:M4T-fix-flaky-grad
Jun 14, 2024
Merged

Set seed for M4T retain grad test#31419
ylacombe merged 1 commit intohuggingface:mainfrom
ylacombe:M4T-fix-flaky-grad

Conversation

@ylacombe
Copy link
Copy Markdown
Contributor

What does this PR do?

The speech encoder attentions of M4T can be None with a non-zero probability when training=True. Instead of skipping the test, this PR fixes the seed so that the first layer is never skipped: test_retain_grad_hidden_states_attentions.

I've ran it multiple times and it passed every time.

cc @amyeroberts

Fixes #28036

Copy link
Copy Markdown
Contributor

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

🥳 🙌

Thanks for fixing!

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ylacombe
Copy link
Copy Markdown
Contributor Author

Thanks for the review @amyeroberts ! Let me know when I can merge!

Copy link
Copy Markdown
Contributor

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Ah, sorry, I meant to approve. All good to merge!

@ylacombe ylacombe merged commit d9daeff into huggingface:main Jun 14, 2024
@ylacombe ylacombe deleted the M4T-fix-flaky-grad branch June 17, 2024 15:11
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.

SeamlessM4T: test_retain_grad_hidden_states_attentions is flaky

3 participants