Add sigma_cauchy and scp_norm to solver statistics in all solvers#253
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds tracking of sigma_cauchy and scp_norm statistics to solver output across all trust-region and regularization-based solvers in the package. These statistics provide important diagnostic information about the solver's behavior at each iteration.
Key changes:
- Addition of
sigma_cauchy(reciprocal of step size parameter) tracking - Addition of
scp_norm(norm of the proximal gradient step) tracking - Consistent placement of these statistics after they are computed in each solver
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/TR_alg.jl | Added sigma_cauchy and scp_norm statistics tracking in the TR solver at initialization and main iteration loop |
| src/TRDH_alg.jl | Added sigma_cauchy and scp_norm statistics tracking in the TRDH solver for both reduce_TR branches |
| src/R2_alg.jl | Added scp_norm statistics tracking in the R2 solver at initialization and main iteration loop |
| src/R2N.jl | Added scp_norm statistics tracking in the R2N solver at initialization and main iteration loop |
| src/R2DH.jl | Added scp_norm statistics tracking and moved sigma_cauchy to after ν₁ is computed in the R2DH solver |
| src/LM_alg.jl | Added sigma_cauchy and scp_norm statistics tracking in the Levenberg-Marquardt solver at initialization and main iteration loop |
| src/LMTR_alg.jl | Added sigma_cauchy and scp_norm statistics tracking in the LMTR solver at initialization and main iteration loop |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #253 +/- ##
===========================================
+ Coverage 61.53% 84.75% +23.22%
===========================================
Files 11 13 +2
Lines 1292 1660 +368
===========================================
+ Hits 795 1407 +612
+ Misses 497 253 -244 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Would it also be useful to report |
I am not sure if the use of ‖ s k ‖ would be suitable for a stationary measure as in R2N we do not necessarily have ‖ s k ‖ < ‖ s k , c p ‖! |
MaxenceGollier
left a comment
There was a problem hiding this comment.
Excellent,
I wonder if scp_norm is a good name though. Since we have a sigma_cauchy, wouldn't it be more appropriate to rename scp_norm as step_cauchy_norm or cauchy_point_norm ? Just an idea we might as well just keep scp_norm.
|
@MaxenceGollier I think the name is correct, what do you think @dpo? |
MaxenceGollier
left a comment
There was a problem hiding this comment.
Maybe add the .gitignore in a separate PR ?
The rest looks good to me.
|
Can you make the corrections please ? @MohamedLaghdafHABIBOULLAH, we are waiting for this to be merged before releasing the package :) |
|
@MaxenceGollier @dpo I think we can keep this as a draft for now and revisit it after the release. The goal here is to store the norm of |
… R2DH, R2N, and R2Solver
Co-authored-by: Maxence Gollier <134112149+MaxenceGollier@users.noreply.github.com>
1ad2e75 to
337169f
Compare
|
I think this PR is ready to be merged, @MaxenceGollier @dpo. |
|
@MohamedLaghdafHABIBOULLAH I agree with @MaxenceGollier that |
We have a theorem that says that if |
|
Could you make the update @MohamedLaghdafHABIBOULLAH ? I am trying to reduce the number of issues in this package. |
Fix this 252