Added logging print levels and verbosity#66
Merged
Conversation
Closed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a simple “print level” concept on the project Logger and wires it into model training/evaluation to control Keras verbosity and reduce unstructured print() usage across the codebase.
Changes:
- Add
Logger.print_level,Logger.print(), andLogger.verbosity()utilities and propagate them to Kerasfit()/predict()/callbacks. - Replace various
print()statements (and remove somemodel.summary()calls) with the new logger behavior. - Update an example executable to set
print_level='warning'.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
physXAI/utils/logging.py |
Adds print levels + verbosity helpers and updates error/warning output to use Logger.print. |
physXAI/preprocessing/constructed.py |
Attempts to route duplicate-registry warnings through Logger.print (currently via an incorrect import). |
physXAI/models/models.py |
Uses Logger.verbosity() to control Keras predict verbosity and routes registry warnings through Logger.print. |
physXAI/models/ann/model_construction/residual_models.py |
Removes unconditional model.summary() output. |
physXAI/models/ann/model_construction/rbf_models.py |
Routes gamma debug output through Logger.print; removes unconditional model.summary(). |
physXAI/models/ann/model_construction/ann_models.py |
Removes unconditional model.summary() output. |
physXAI/models/ann/ann_design.py |
Uses Logger.verbosity() for Keras fit + EarlyStopping verbosity; gates model.summary() behind print level. |
physXAI/feature_selection/recursive_feature_elimination.py |
Replaces print() statements with Logger.print. |
physXAI/evaluation/metrics.py |
Replaces metric print() calls with Logger.print and removes Metrics.print_evaluate. |
executables/bestest_hydronic_heat_pump/P_hp.py |
Example sets logger print_level='warning'. |
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.
Pull Request
Description
Added logging print levels and verbosity
Type of Change
Required Checklist
Testing
Examples
Compatibility
pyproject.toml(required independenciesor optional in[project.optional-dependencies])Documentation
Breaking Changes
Optional
GitHub Copilot Review