-
Notifications
You must be signed in to change notification settings - Fork 31.7k
[tests] make test_from_pretrained_low_cpu_mem_usage_equal less flaky
#36255
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
[tests] make test_from_pretrained_low_cpu_mem_usage_equal less flaky
#36255
Conversation
|
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. |
|
Thank you @gante I was also looking at this, but interrupted by the lunch . It looks like it fails in the first run (where there is still no local cache for this model), and I am going to push something and let's see. |
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.
works for me, but let's ping @muellerzr / @SunMarc for a second eyes as they might know if there is any recent change in accelerate that cause this flakyness
Feel free to merge (to avoid failing on main) however: we could revise if the above experts have different opinions
|
For the record: Still get 3 failures in a 100 runs. |
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 spent a bit of time on this test and the flakyness comes from the cpu memory report which is a bit inconsistant. Also, due to this inconsistency, we are not testing the loading correctly since the model is way too small (tiny bert is only 500kb and we are allowing a delta of 2MB) ;). With the modification I proposed, it should be better. If you think that the model is still too big, maybe we can make this a slow test.
|
@SunMarc the test indeed becomes slow (~10 secs) -- added the |
SunMarc
left a comment
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 !
What does this PR do?
test_from_pretrained_low_cpu_mem_usage_equalhas been failing frequently:Increasing the tolerance a little bit should do it 🤗