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

Add SaveCheckpoint callback for checkpointing #2317

Merged
merged 11 commits into from Nov 14, 2023
Merged

Add SaveCheckpoint callback for checkpointing #2317

merged 11 commits into from Nov 14, 2023

Conversation

martinkim0
Copy link
Contributor

@martinkim0 martinkim0 commented Nov 8, 2023

  • Closes Add changes to make saving intermediate checkpoints easier #2264
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest docs/release_notes/index.md file if fixing a bug or adding a new feature.
  • If the changes are patches for a version, I have added the on-merge: backport to x.x.x label.

To do

  • Document what arguments are unsupported

@martinkim0 martinkim0 changed the title Initial implementation of model checkpoint Modify ModelCheckpoint for compatibility with BaseModelClass.save Nov 8, 2023
@martinkim0 martinkim0 changed the title Modify ModelCheckpoint for compatibility with BaseModelClass.save Modify ModelCheckpoint for compatibility with BaseModelClass.save Nov 8, 2023
@martinkim0 martinkim0 added this to the scvi-tools 1.1.0 milestone Nov 8, 2023
@martinkim0
Copy link
Contributor Author

Could be useful to add a post-training cleanup method in BaseModelClass that handles setting attributes such as is_trained_ once TrainRunner completes, since there is some redundant code upon saving a checkpoint.

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (6fe4dda) 89.26% compared to head (7a7ef56) 89.29%.

Files Patch % Lines
scvi/train/_callbacks.py 90.24% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2317      +/-   ##
==========================================
+ Coverage   89.26%   89.29%   +0.03%     
==========================================
  Files         145      145              
  Lines       11827    11872      +45     
==========================================
+ Hits        10557    10601      +44     
- Misses       1270     1271       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martinkim0 martinkim0 changed the title Modify ModelCheckpoint for compatibility with BaseModelClass.save Add SaveCheckpoint callback for checkpointing Nov 10, 2023
@martinkim0 martinkim0 merged commit 91dad89 into main Nov 14, 2023
7 checks passed
@martinkim0 martinkim0 deleted the checkpointing branch November 14, 2023 23:15
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

Successfully merging this pull request may close these issues.

Add changes to make saving intermediate checkpoints easier
1 participant