-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implement saving and loading of models #19
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.
Very nice export. I am not sure where we want the export to be called. Should this be controlled by the train script or the trainer?
ARCHITECTURE_NAME = "soap_bpnn" | ||
|
||
DEFAULT_MODEL_HYPERS = OmegaConf.to_container( | ||
OmegaConf.load(ARCHITECTURE_CONFIG_PATH / "soap_bpnn.yaml") | ||
)["model"] |
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.
I think we don't have to set hypers to a default value or is there a specific reason?
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.
In this way, it's much easier to use the model from Python. For example, the test I've written for the model_io module would have been much more difficult. In general, I feel like, if we want to support model use from Python as well, we need to make the hypers available from Python as well
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.
Okay I get your point but then maybe it makes sense to provide a general parser and store the hypers as dictionary in the init of each architecture.
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.
I feel like this is short enough for the moment... Perhaps we can change it once we have more models?
EDIT: I now understand the question I would say at least in part the trainer (because we need to checkpoint). The last model save (at the end of training) can be done either by the trainer or by |
I am more and more thinking that we should create a class for training with a |
b34b1c2
to
dc8bb6f
Compare
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.
I have a minor idea that we should integrate the save_model
maybe as a class method. Othwerwise it is very nice!
dc8bb6f
to
b22aee6
Compare
📚 Documentation preview 📚: https://metatensor-models--19.org.readthedocs.build/en/19/