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

add strict arg to load_checkpoint_and_dispatch #2641

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

SunMarc
Copy link
Member

@SunMarc SunMarc commented Apr 9, 2024

What does this PR do ?

This PR adds the strict arg in load_checkpoint_and_dispatch. We need this since this PR introduced a breaking change in the way to error out when the keys in the checkpoint state_dict do not match the keys of the model's state_dict.
Fixes #2640 (comment) cc @yiyixuxu
maybe worth doing a patch @muellerzr ? There are other issues in diffusers so let's wait a bit if we indeed do a patch.

@SunMarc SunMarc requested a review from muellerzr April 9, 2024 16:23
@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.

Copy link
Collaborator

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Thanks I agree its worth doing a patch, we also should probably run some diffusers stuff in our integration tests that we can run as part of the CI to check for breaking. @sayakpaul do you know an easy subset/file of tests we can run just for sanity testing on main? For transformers we run the test_trainer.py file

@sayakpaul
Copy link
Member

@muellerzr

Do the tests and our examples directory work?

@muellerzr
Copy link
Collaborator

@sayakpaul if they broke due to what this PR is fixing, yes :)

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.

allow strict=True in load_checkpoint_and_dispatch
4 participants