Expose logger logging mode and stabilize rank-zero logging#21526
Open
MagellaX wants to merge 3 commits intoLightning-AI:masterfrom
Open
Expose logger logging mode and stabilize rank-zero logging#21526MagellaX wants to merge 3 commits intoLightning-AI:masterfrom
MagellaX wants to merge 3 commits intoLightning-AI:masterfrom
Conversation
for more information, see https://pre-commit.ci
Author
|
can anybody review this and merge it!!!? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Expose the current logging mode (
"step"or"epoch") to loggers so they can adapt behavior based on the caller context. The connector now sets this mode aroundlog_metrics, and a test covers it.Additionally, this makes rank-zero logging consistently use the PyTorch logger (fixes debug log capture in tests) and skips symlink-dependent tests on platforms that don’t support symlinks. The model registry doctest was updated to be OS-path-agnostic.
Fixes #20502
Dependencies: None
Breaking changes: None
Tests:
python -m pytest tests/tests_pytorch/trainer/connectors/test_logger_connector.py -qpython -m pytest tests/tests_pytorch/loops/test_training_loop.py::test_fit_loop_done_log_messages -qpython -m pytest tests/tests_pytorch/loops/test_training_loop.py::test_should_stop_early_stopping_conditions_met -qpython -m pytest tests/tests_pytorch/checkpointing/test_model_checkpoint.py -qpython -m pytest tests/tests_pytorch/loggers/test_tensorboard.py -qpython -m pytest src/lightning/pytorch tests/tests_pytorch -q(timed out after 30 min)Before submitting
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
📚 Documentation preview 📚: https://pytorch-lightning--21526.org.readthedocs.build/en/21526/