Skip to content

Conversation

@senarvi
Copy link
Contributor

@senarvi senarvi commented Feb 10, 2025

What does this PR do?

NeptuneLogger.after_save_checkpoint() will upload the last and the best model checkpoint using

self.run[...].upload(<filepath>)

instead of

with open(<filepath>) as fp:
    self.run[...] = File.from_stream(fp)

In addition to reducing a couple of lines of code, this will cause the file extension of the checkpoint to appear correctly as .ckpt instead of .bin.

The current code already uploads the best k models this way.

To me this seems like a pretty trivial fix, but I can start a discussion if needed. Maybe some of the previous authors of NeptuneLogger can comment if it was written as it is on purpose? @shnela @Raalsky @williamFalcon @kshitij12345

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--20581.org.readthedocs.build/en/20581/

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Feb 10, 2025
@codecov
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79%. Comparing base (41315bc) to head (ea23621).
Report is 115 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (41315bc) and HEAD (ea23621). Click for more details.

HEAD has 532 uploads less than BASE
Flag BASE (41315bc) HEAD (ea23621)
cpu 143 24
python 18 3
lightning_fabric 29 0
pytest 75 0
lightning 91 15
python3.11 36 6
python3.10 35 6
gpu 3 0
python3.12.7 54 9
pytorch2.1 18 6
pytorch_lightning 26 9
pytest-full 71 24
pytorch2.3 9 3
pytorch2.2.2 9 3
pytorch2.5 8 3
pytorch2.4.1 9 3
pytorch2.6 9 3
pytorch2.5.1 9 3
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #20581     +/-   ##
=========================================
- Coverage      88%      79%     -9%     
=========================================
  Files         267      264      -3     
  Lines       23358    23300     -58     
=========================================
- Hits        20463    18347   -2116     
- Misses       2895     4953   +2058     

@Borda Borda added logger Related to the Loggers 3rd party Related to a 3rd-party community This PR is from the community labels Feb 14, 2025
@Borda Borda merged commit 96df8c4 into Lightning-AI:master Mar 14, 2025
79 checks passed
Borda pushed a commit that referenced this pull request Mar 18, 2025
…#20581)

Fix file extension of uploaded model checkpoints

Co-authored-by: Seppo Enarvi <[email protected]>
(cherry picked from commit 96df8c4)
lexierule pushed a commit that referenced this pull request Mar 18, 2025
…#20581)

Fix file extension of uploaded model checkpoints

Co-authored-by: Seppo Enarvi <[email protected]>
(cherry picked from commit 96df8c4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3rd party Related to a 3rd-party community This PR is from the community logger Related to the Loggers pl Generic label for PyTorch Lightning package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants