-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Change no trainer image_classification test #17635
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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 for fixing (and making the test stronger!)
However I'm noticing it now takes 68s for the test (the longest time) so can we lower the threshold and the number of steps somehow?
@sgugger I've addressed the speed concern in the test, but you won't actually see it show up due to a bug in the scheduler step recalculation. I'll open up another PR for that fix and then merge this one after that's done |
* Adjust test arguments and use a new example test
* Adjust test arguments and use a new example test
What does this PR do?
I noticed that this test has been failing for the last few months, and it's due to the fact that on a single GPU or CPU the tests pass (we hit 50% accuracy), but on multi GPU it's a hit or miss whether or not it does (each epoch/batch is either 50% or 0%, and we happen to miss that coin flip each time).
This PR modifies the no_trainer test to mimic the equivalent pytorch example tests, and I can confirm it passes repeatedly on a single GPU, CPU, and multi GPU: https://github.com/huggingface/transformers/blob/main/examples/pytorch/test_pytorch_examples.py#L390-L417
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@sgugger @NielsRogge