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

Fix last and best checkpoints issue #160

Merged
merged 1 commit into from
May 24, 2024
Merged

Fix last and best checkpoints issue #160

merged 1 commit into from
May 24, 2024

Conversation

HangJung97
Copy link
Member

@HangJung97 HangJung97 commented May 24, 2024

What does this PR do?

Fix last and best checkpoints issue:

  • Lightning's save_last in ModelCheckpoint checkpoint does not actually save the last model but creates a symbolic link to the best weight. Hence, it is required to add another ModelCheckpoint callback that monitors epoch to save the latest checkpoint.
  • Best checkpoint is now saved as best.ckpt and best_epoch_{number}.ckpt, while last checkpoint is saved as last.ckpt and latest_epoch_{number}.ckpt.

Before submitting

  • Did you make sure title is self-explanatory and the description concisely explains the PR?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you test your PR locally with pytest command?
  • Did you run pre-commit hooks with pre-commit run -a command?

Did you have fun?

Make sure you had fun coding 🙃

@HangJung97 HangJung97 self-assigned this May 24, 2024
@HangJung97 HangJung97 merged commit 0e43ba5 into main May 24, 2024
1 check passed
@HangJung97 HangJung97 deleted the feature/ckpt branch May 24, 2024 18:49
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.

1 participant