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

keep state_dict kwargs instead of popping it in save_pretrained #393

Merged
merged 1 commit into from
May 31, 2023

Conversation

rizar
Copy link
Contributor

@rizar rizar commented May 29, 2023

This PR fixes the following issue: when save_pretrained(...) was called for AutoModelForCausalLMWithValueHead with an explicitly given state_dict, this state_dict was deleted from kwargs and not passed further. I believe the intended behavior was to keep state_dict in kwargs if it's already in there.

Copy link
Member

@lvwerra lvwerra left a comment

Choose a reason for hiding this comment

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

Looks good to me but I'll let @younesbelkada double check :)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 30, 2023

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

Copy link
Collaborator

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

LGTM! Merging once the CIs are green!

@younesbelkada younesbelkada merged commit a5b0414 into huggingface:main May 31, 2023
11 checks passed
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.

None yet

4 participants