Skip to content

Conversation

@gante
Copy link
Contributor

@gante gante commented Feb 18, 2025

What does this PR do?

test_from_pretrained_low_cpu_mem_usage_equal has been failing frequently:

Increasing the tolerance a little bit should do it 🤗

@gante gante requested a review from ydshieh February 18, 2025 11:44
@HuggingFaceDocBuilderDev

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.

@ydshieh
Copy link
Collaborator

ydshieh commented Feb 18, 2025

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.

Copy link
Collaborator

@ydshieh ydshieh left a 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

@ydshieh
Copy link
Collaborator

ydshieh commented Feb 18, 2025

For the record: Still get 3 failures in a 100 runs.

Copy link
Member

@SunMarc SunMarc left a 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.

@gante
Copy link
Contributor Author

gante commented Feb 19, 2025

@SunMarc the test indeed becomes slow (~10 secs) -- added the @slow decorator 🤗

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

Thanks !

@gante gante merged commit e3d99ec into huggingface:main Feb 19, 2025
11 checks passed
@gante gante deleted the test_from_pretrained_low_cpu_mem_usage_equal branch February 19, 2025 15:14
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.

5 participants