Implement SolverCore.reset!(solver) function#293
Implement SolverCore.reset!(solver) function#293MaxenceGollier wants to merge 5 commits intoJuliaSmoothOptimizers:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #268 by eliminating solver statefulness across repeated solve! calls: it resets the initial vector used by the power-method-based operator-norm estimate so running the same solver instance twice yields consistent results.
Changes:
- Added
_reset_power_method!helper to reinitialize the power method starting vector. - Invoked
_reset_power_method!at the beginning ofsolve!forTRSolverandR2NSolver.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/utils.jl |
Adds _reset_power_method! used to reinitialize the power iteration vector. |
src/TR_alg.jl |
Calls _reset_power_method! at the start of solve! to prevent cross-run drift. |
src/R2N.jl |
Calls _reset_power_method! at the start of solve! to prevent cross-run drift. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #293 +/- ##
===========================================
+ Coverage 61.53% 83.73% +22.20%
===========================================
Files 11 13 +2
Lines 1292 1642 +350
===========================================
+ Hits 795 1375 +580
+ Misses 497 267 -230 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@MohamedLaghdafHABIBOULLAH, in |
|
Let me know what you think, @MohamedLaghdafHABIBOULLAH. |
closes #268
Added a function that resets the initial vector of the power norm iteration method.