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

Handle checkpoint dirpath suffix in NeptuneLogger #18863

Merged
merged 33 commits into from
Nov 25, 2023

Conversation

AleksanderWWW
Copy link
Contributor

@AleksanderWWW AleksanderWWW commented Oct 25, 2023

What does this PR do?

Fixes #<issue_number>

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

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--18863.org.readthedocs.build/en/18863/

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Oct 25, 2023
@AleksanderWWW AleksanderWWW marked this pull request as ready for review October 26, 2023 09:27
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #18863 (1f5130e) into master (1fcb4ae) will decrease coverage by 34%.
The diff coverage is 80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #18863      +/-   ##
==========================================
- Coverage      83%      49%     -34%     
==========================================
  Files         443      435       -8     
  Lines       36572    36420     -152     
==========================================
- Hits        30467    17817   -12650     
- Misses       6105    18603   +12498     

src/lightning/pytorch/loggers/neptune.py Outdated Show resolved Hide resolved
@AleksanderWWW
Copy link
Contributor Author

@Borda how shall I proceed with this doctest failure due to the check running on ubuntu, while the line assumes windows os?

Copy link
Contributor

@normandy7 normandy7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some styling proposals.

src/lightning/pytorch/loggers/neptune.py Outdated Show resolved Hide resolved
tests/tests_pytorch/loggers/test_neptune.py Outdated Show resolved Hide resolved
@awaelchli
Copy link
Contributor

@AleksanderWWW The tests need to be updated to reflect the change. Here we have two failures:

FAILED loggers\test_neptune.py::test_after_save_checkpoint - AssertionError: __getitem__('training/model/checkpoints/model2/with/slashes') call not found
FAILED loggers\test_neptune.py::test_get_full_model_name - AssertionError: assert 'key\\in\\parts' == 'key/in/parts'
  - key/in/parts
  ?    ^  ^
  + key\in\parts
  ?    ^  ^
= 2 failed, 2682 passed, 592 skipped, 6 xfailed, 1 xpassed, 3990 warnings in 652.40s (0:10:52) =

Please let me know if you need help with it.

@awaelchli awaelchli added the community This PR is from the community label Nov 16, 2023
@awaelchli awaelchli added this to the 2.1.x milestone Nov 16, 2023
@awaelchli awaelchli added callback: model checkpoint bug Something isn't working labels Nov 16, 2023
@AleksanderWWW
Copy link
Contributor Author

@AleksanderWWW The tests need to be updated to reflect the change. Here we have two failures:

FAILED loggers\test_neptune.py::test_after_save_checkpoint - AssertionError: __getitem__('training/model/checkpoints/model2/with/slashes') call not found
FAILED loggers\test_neptune.py::test_get_full_model_name - AssertionError: assert 'key\\in\\parts' == 'key/in/parts'
  - key/in/parts
  ?    ^  ^
  + key\in\parts
  ?    ^  ^
= 2 failed, 2682 passed, 592 skipped, 6 xfailed, 1 xpassed, 3990 warnings in 652.40s (0:10:52) =

Please let me know if you need help with it.

Hey,
Thank you, on it. Sorry for lack of responsiveness - busy time + some time off on my part. Will try to address it as soon as possible!

@AleksanderWWW
Copy link
Contributor Author

@awaelchli Fixed :) sorry it took so long

@awaelchli awaelchli changed the title handle checkpoint dirpath suffix Handle checkpoint dirpath suffix in NeptuneLogger Nov 25, 2023
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the missing test case
LGTM

@awaelchli awaelchli merged commit af852ff into Lightning-AI:master Nov 25, 2023
90 checks passed
@awaelchli
Copy link
Contributor

FYI, there is a related issue here #15705 with other edge cases for this function.

Borda pushed a commit that referenced this pull request Dec 19, 2023
Co-authored-by: Siddhant Sadangi <[email protected]>
Co-authored-by: Sabine <[email protected]>
Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: awaelchli <[email protected]>
(cherry picked from commit af852ff)
lantiga pushed a commit that referenced this pull request Dec 20, 2023
Co-authored-by: Siddhant Sadangi <[email protected]>
Co-authored-by: Sabine <[email protected]>
Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: awaelchli <[email protected]>
(cherry picked from commit af852ff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community This PR is from the community logger: neptune pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants