fix: restore print after fenn run#175
Open
sanmaxdev wants to merge 1 commit into
Open
Conversation
Contributor
|
Yo @sanmaxdev, thanks for the PR Please, write to an issue first next time, so there are no misunderstandings between contributors |
Author
|
Got it, thanks. I’ll open an issue first next time before sending a PR. |
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?
Restores Python's original
printafterFenn.run()finishes, including when the entrypoint raises unexpectedly. Userprint()calls are still captured by the Fenn logger while the entrypoint is running, but exception handlers and code afterrun()now use normal stdout behavior again.This also clears the configured log file paths when the logger closes so later standalone CLI logging cannot write to stale per-run files.
Issue link
Fixes #171
Checklist before merging
Additional notes
Validation run:
python -m pytest tests/unit/test_print_redirection.py tests/unit/cli/test_run_command.py tests/unit/utils/test_utils.py -q— 16 passedpython -m pytest tests/unit -q --ignore=tests/unit/vision --ignore=tests/unit/nn— 411 passed, 1 skippedpre-commit run --files fenn/utils/logging.py fenn/core/fenn.py tests/unit/test_print_redirection.py— passedgit diff --cached --check— passed before commit