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

Correctly save DP/DDP checkpooints #9

Open
danieltudosiu opened this issue Jun 27, 2022 · 3 comments
Open

Correctly save DP/DDP checkpooints #9

danieltudosiu opened this issue Jun 27, 2022 · 3 comments

Comments

@danieltudosiu
Copy link

The correct way of saving DP/DDP checkpoints is to access the module parameter of the class.

Please do that instead of saving the whole DP/DDP class' state dict and then trimming the name.

@kayhan-batmanghelich
Copy link

kayhan-batmanghelich commented Jun 27, 2022 via email

@lisun-ai
Copy link
Collaborator

Hi there,

Thanks for your message. We followed the official PyTorch ImageNet training code for saving DP/DDP class' state dict. The name prefix trimming method is commonly adopted in other repos. We will add an annotation to this part. If you have further concerns, please initiate a pull request.

Thanks,
Li

@danieltudosiu
Copy link
Author

Hi Li,

From my knowledge of Ignite/MONAI that's not the cleanest way.

https://github.com/pytorch/ignite/blob/master/ignite/handlers/checkpoint.py#L463

Cheers,

Dan

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

No branches or pull requests

3 participants