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 gather for TPU #13813

Merged
merged 1 commit into from
Sep 30, 2021
Merged

Fix gather for TPU #13813

merged 1 commit into from
Sep 30, 2021

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Sep 30, 2021

What does this PR do?

This PR fixes #13798, which is cause by the gather of trainer loss, a 0d-tensor. The code does not add one dimension to those to concatenate properly, resulting in the error.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

SG

@sgugger sgugger merged commit 269c3d1 into master Sep 30, 2021
@sgugger sgugger deleted the tpu_trainer_fix branch September 30, 2021 15:32
@patrickvonplaten
Copy link
Contributor

Thanks for fixing it - sorry should have tested on TPU as well :-/

@sgugger
Copy link
Collaborator Author

sgugger commented Sep 30, 2021

No worries!

stas00 pushed a commit to stas00/transformers that referenced this pull request Oct 12, 2021
lapisfluvialis pushed a commit to lapisfluvialis/transformers that referenced this pull request Oct 27, 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.

transformers seems to have recently been "bricked"
3 participants