add hess for RegularizedNLPModels#87
add hess for RegularizedNLPModels#87MaxenceGollier merged 2 commits intoJuliaSmoothOptimizers:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds hess method implementations for AbstractRegularizedNLPModel types to complement the existing hess_op method. The changes enable specialized subtypes (like the L2PenalizedProblem mentioned in the related PR #81) to dispatch custom Hessian implementations while maintaining consistent API behavior.
Changes:
- Added two
hessmethod overloads that forward to the underlying smooth model, following the same pattern as the existinghess_opmethod - Both methods only compute the Hessian of the smooth objective component, correctly handling the nonsmooth regularizer which doesn't have a classical Hessian
Comments suppressed due to low confidence (1)
src/types.jl:76
- Extra blank line. The codebase consistently uses single blank lines between function definitions and sections. Please remove one of the blank lines.
if field == :name
💡 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 @@
## main #87 +/- ##
===========================================
- Coverage 99.18% 76.78% -22.40%
===========================================
Files 11 19 +8
Lines 369 461 +92
===========================================
- Hits 366 354 -12
- Misses 3 107 +104 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1fc898e
into
JuliaSmoothOptimizers:main
Related: #81