-
Notifications
You must be signed in to change notification settings - Fork 38
Add materialisation of new modules before loading checkpoint #1030
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
Add materialisation of new modules before loading checkpoint #1030
Conversation
The |
Is this ready for review? |
Yes |
) | ||
|
||
model_state_dict = self.model.state_dict() | ||
params = { |
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.
Can you add a comment explaining 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.
I wanna test this with a couple configs and then I will approve it
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.
This is a good fix. It is not fully complete as I think with new encoders/decoders that have the same parameter shapes as the existing model there will be issues, but this cannot be solved until embedding engines, prediction heads, etc are named according to the stream names they belong to. This issue is for a new PR.
Note I test with pre-training on ERA5 and continuing with ERA5, NPPATMS, & SYNOP on 2 GPUs |
* Add materialisation of new modules before loading checkpoint * Initialize new modules in load_model * Fix adding new embedding networks
Description
Fixes crash when using
--forecast_finetune
flag by adding materialization of new modules before loading checkpointIssue Number
Closes #1029
Checklist before asking for review
./scripts/actions.sh lint
./scripts/actions.sh unit-test
./scripts/actions.sh integration-test
launch-slurm.py --time 60