-
Notifications
You must be signed in to change notification settings - Fork 880
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
Raise error when saving with param on meta device #2132
Raise error when saving with param on meta device #2132
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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.
LG2M! Small suggestion for efficiency :) Thanks for the blocker
Co-authored-by: Zach Mueller <muellerzr@gmail.com>
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.
Thank you @SunMarc for adding this!
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 for this update, it should hopefully help many users who are currently confused. I only have a nit, up to you if you want to fix it.
what does this PR do ?
This PR fixes the
save_model
method when a user tries to use it on a model with some parameters on themeta
device. I didn't check thehf_device_map
since it is not the only case where a user might move the model to the meta device. However, the warning that we have put in the dispatch function should be enough to let the user know that some parameters were offloaded. Fixes #2128