Console messaging optimization and addition of SNMFOptimizer.objective_log#195
Open
Andrea-gm wants to merge 13 commits intodiffpy:mainfrom
Open
Console messaging optimization and addition of SNMFOptimizer.objective_log#195Andrea-gm wants to merge 13 commits intodiffpy:mainfrom
Andrea-gm wants to merge 13 commits intodiffpy:mainfrom
Conversation
Was giving me errors due to use of python 3.11
Optimized print messages Added verbose option Added objective_log attribute to track objective function updates, with associated time stamps and specifying what matrix has been updated
Fixed wrong setting of objective_log
remove commented print messages
Added "iteration" key to objective_log Removed redundant _objective_history attribute
Contributor
Author
|
I applied my changes to the previous version of the main branch. I am now resolving the conflicts keeping the new modifications implemented in main. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #195 +/- ##
===========================================
- Coverage 77.50% 57.50% -20.00%
===========================================
Files 3 3
Lines 40 40
===========================================
- Hits 31 23 -8
- Misses 9 17 +8 🚀 New features to boost your workflow:
|
Contributor
Author
|
I updated the attribute nomenclature to match the new version of main, and removed all conflicts arising from versioning. There are now no conflicts with the base branch, but I'm unsure of why the codecov is failing |
Contributor
|
Thanks Andrea, this looks great. The codecov, I believe, is failing for reasons totally unrelated to your PR. Will let Simon confirm. |
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.
This PR introduces a structured logging system and adds user control over console output during optimization. The legacy objective history list has been entirely replaced by the new objective log attribute, which stores a detailed history of the optimization process by recording the step, iteration, objective value, and timestamp at each update. Convergence checks and step-size calculations have been refactored to pull directly from this new log, eliminating redundant data tracking. Additionally, a verbose parameter was added to the optimizer initialization to toggle terminal output. All internal print messages have been rewritten for clarity and are now conditionally executed based on this verbose flag.