Conversation
The objective of this change is to move the QN updates to a callback instead of having it performed in a generic manner by the solver. This will allow for customized QN updates.
There was a problem hiding this comment.
Pull request overview
This PR adds an extra vector field v to the LBFGSModel and LSR1Model structs to store gradient differences (yₖ = ∇fₖ₊₁ - ∇fₖ). This change lays the groundwork for moving quasi-Newton updates to callbacks instead of having them performed generically by the solver, enabling customized QN updates.
Changes:
- Added
v::Sfield toLBFGSModelandLSR1Modelstructs for storing gradient differences - Updated constructors to initialize the new vector field using
similar(nlp.meta.x0)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tmigot
left a comment
There was a problem hiding this comment.
Thanks @dpo !
Should we also specialize the push! for these two operators ?
NLPModelsModifiers.jl/src/quasi-newton.jl
Line 218 in 083636e
|
Do you mean that |
|
Sure, let's keep it as it is now. The rest looks good to me, thanks! |
|
Thanks @tmigot and @MaxenceGollier ! |
The objective of this change is to move the QN updates to a callback instead of having it performed in a generic manner by the solver. This will allow for customized QN updates.