-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 ModelCheckpoint dirpath expanding home prefix #19058
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #19058 +/- ##
==========================================
- Coverage 83% 49% -34%
==========================================
Files 443 435 -8
Lines 36553 36400 -153
==========================================
- Hits 30466 17815 -12651
- Misses 6087 18585 +12498 |
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.
TIL that realpath
doesn't resolve ~
.
You might want to double check if this would be a welcome change in other places that we call realpath
(cherry picked from commit 58c905b)
(cherry picked from commit 58c905b)
What does this PR do?
If the user provides
ModelCheckpoint(dirpath="~/checkpoints")
, the path doesn't get expanded. Instead, it creates the folder with name~
in the current working directory.📚 Documentation preview 📚: https://pytorch-lightning--19058.org.readthedocs.build/en/19058/
cc @Borda @carmocca @awaelchli