Use live parameters in sparse constraint Jacobians - #1289
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
Use live parameters in sparse constraint Jacobians#1289ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Member
Author
|
Investigation scratchpad:
|
Member
Author
|
Additional local validation: |
Member
Author
|
The patched end-to-end BoundaryValueDiffEqMIRK parameter-tuning solve also passes with the existing immutable |
Member
Author
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.
Ignore this PR until it has been reviewed by @ChrisRackauckas.
Depends on #1288. After that PR merges, this branch should be rebased, bump OptimizationBase from 5.2.5 to 5.2.6, bump OptimizationIpopt from 1.3.0 to 1.3.1, and require OptimizationBase 5.2.6 from OptimizationIpopt. It intentionally does not compete for the 5.2.5 version number while both PRs are open.
Problem
OptimizationIpopt 1.3 switched to the shared
OptimizationCacheand now calls constraint Jacobians with the cache's live parameter value. The dense DifferentiationInterface path accepts(J, x, p), but the sparse wrappers capture the initialization parameter and only accept(J, x)(orxout of place).That mismatch breaks BoundaryValueDiffEqMIRK's parameter-tuning solve with a three-argument
MethodError. Auto-generated sparse Jacobians also silently keep using the initialization parameter after a cache parameter change.Change
p, in place and out of place.xandp.Local verification
GROUP=OptimizationBase_AD julia +1.10 --project=. -e 'using Pkg; Pkg.test()'AD | 785 passed / 785 totalGROUP=OptimizationBase julia +1.10 --project=. -e 'using Pkg; Pkg.test()'Core | 52 passed / 52 totalGROUP=OptimizationIpopt julia +1.10 --project=. -e 'using Pkg; Pkg.test()'Core | 129 passed, 1 pre-existing broken / 130 total17.096586859834332--check .passed.