-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Add with torch.no_grad()
to DistilBERT integration test forward pass
#14979
Conversation
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'm not sure those checks were meant under the scope of the issue. I think it was only for the last integration test, but I'll let @LysandreJik confirm.
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.
The request was indeed meant only for the integration tests :)
Thank you for the feedback and confirmation! I've reverted the change. |
Hello @jaketae, were your last changes committed? I still see a lot of non-integration tests with |
@LysandreJik Apologies for the delay! I thought I had properly committed and pushed the changes but seems like that wasn't the case. Reverted most of the |
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.
Thanks a lot!
What does this PR do?
This PR encapsulates forward passes in DistilBERT unit tests with
with torch.no_grad():
as per #14642.Also, a unit test seemed to terminate early due to a
return
in a loop; this was replaced withcontinue
. (If this was not what was intended, I will rollback the modification.)Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@NielsRogge @LysandreJik @sgugger