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

Fix load of model checkpoints in the Trainer #18470

Merged
merged 1 commit into from
Aug 4, 2022
Merged

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Aug 4, 2022

What does this PR do?

#18221 broke the model reload when the contributor removed the strict_load variable (as requested in the review) without setting it to its proper value in the calls to load_state_dict after. This PR addresses that.

Fixes #18373

@sgugger sgugger requested a review from LysandreJik August 4, 2022 11:55
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 4, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

LGTM!

@sgugger sgugger merged commit df28de0 into main Aug 4, 2022
@sgugger sgugger deleted the fix_model_reload branch August 4, 2022 12:22
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.

Transformers 4.21.0: Can't load XLMRoberta checkpoints
3 participants