-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Use PytorchModelHubMixin to save models as safetensors #125
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
Conversation
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.
Left some comments. Nothing blocking merging. Nice work!!!
Co-authored-by: Remi <[email protected]>
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.
Hey there! Sorry I only spotted this PR now :) Nice work to use PytorchModelHubMixin
to integrate with the Hub!
I left a comment below as I think it can be even more tightly integrated for better documentation/discoverability on the Hub. In general, never hesitate to ping me (@Wauplin) in any PR that is related to the Hub. I'm maintain huggingface_hub
and I'd be happy to help if you have questions about how other HF libraries are doing (and stay consistent with them) 🤗
Co-authored-by: Remi <[email protected]>
Co-authored-by: Remi <[email protected]>
Co-authored-by: Remi <[email protected]>
Co-authored-by: Remi <[email protected]>
What does this PR do?
Primary changes:
save
andload
from all policies.logger.py
to usesave_pretrained
instead ofsave
, and to separately save the Hydra config as a yaml file.eval.py
to usefrom_pretrained
(this consolidates the two user paths into one, at the expense of some conditional branching in the code).Side changes:
get_policy_and_config_classes
to avoid repetition of the conditional branching across policy names.ACTConfig.d_model
toACTConfig.dim_model
for consistency withACTConfig.dim_feedforward
.Not for this PR:
How was it tested?
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR. Try to avoid tagging more than 3 people.