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

Change checkpoint filename without overwriting full filepath #2583

Closed
wietsedv opened this issue Jul 11, 2020 · 1 comment · Fixed by #3163
Closed

Change checkpoint filename without overwriting full filepath #2583

wietsedv opened this issue Jul 11, 2020 · 1 comment · Fixed by #3163
Labels
feature Is an improvement or enhancement help wanted Open to be worked on won't fix This will not be worked on

Comments

@wietsedv
Copy link

🚀 Feature

By default, the checkpoint path resolves to lightning_logs/{version}/checkpoints/{epoch}.ckpt. It is currently not possible to change the checkpoint filename without replacing the full path.

Motivation

The full path is replacable with the ModelCheckpoint.filepath argument. This feature is undisirable because I want to use the default path resolver that uses the options from Trainer instead of hardcoding a path.

A satisfying path construction workaraound based on values in Trainer is not possible because the Trainer is constructed after the ModelCheckpoint.

Pitch

I would like to add a filename parameter to the ModelCheckpoint constructor. This parameter is complementary to filepath and filepath will keep working like it does for backward compatibility.

  • If only filepath is provided, the original behaviour is used.
  • If both filepath and filename are provided, the checkpoint path will resolve to filepath/filename.
  • If only filename is provided, the checkpoint path will resolve to resolved directory/filename (instead of resolved directory/epoch).
@wietsedv wietsedv added feature Is an improvement or enhancement help wanted Open to be worked on labels Jul 11, 2020
@stale
Copy link

stale bot commented Sep 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Sep 9, 2020
@stale stale bot closed this as completed Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement help wanted Open to be worked on won't fix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant