Construct explicit second-order AD for optimization BVPs - #573
Draft
ChrisRackauckas-Claude wants to merge 1 commit into
Draft
Construct explicit second-order AD for optimization BVPs#573ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Contributor
Benchmark Results (Julia v1.11)Time benchmarks
Memory benchmarks
|
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.
Summary
SecondOrderdense backendAutoZygote,AutoSymbolics, an existingSecondOrder, andNoADRoot cause
MIRK optimization problems currently pass a first-order
AutoSparsebackend toOptimizationFunction. OptimizationBase can synthesize its second-order backend later, but the genericOptimizationCachenow checks the original AD type first and correctly warns that an explicit second-order backend was not provided. That warning makes both existing@test_nowarnregression cases fail after OptimizationIpopt moved to the generic cache.This change constructs the same second-order combinations that OptimizationBase would generate, but does so before the cache is initialized.
SecondOrderis imported directly from its public owner, DifferentiationInterface.The same downgrade also exposed a separate sparse constraint-Jacobian live-parameter failure. That belongs in OptimizationBase and is fixed by SciML/Optimization.jl#1270.
Dependencies
This is the BoundaryValueDiffEq companion to:
AutoSparse(SecondOrder(...))as an explicitly supplied second-order backendThe OptimizationBase compatibility floor cannot be raised until those changes have a coordinated registered release; SciML/Optimization.jl#1287 is coordinating the sequential package version.
Validation
On clean current
upstream/master, the Julia 1.10 MIRK Core downgrade with OptimizationIpopt 1.3.0 and released OptimizationBase reproduces the regression inMIRK Basic Tests: 197 passed, 2 failed, 1 errored (200 total). The failures are the two capturedmissing_second_order_adwarnings; the error is the structured-parameter sparse constraint-Jacobian callback.With this branch plus the exact changes from Optimization PRs #1269 and #1270:
BoundaryValueDiffEqMIRK,GROUP=Core: passedBoundaryValueDiffEqCore,GROUP=Core: 14/14 passedBoundaryValueDiffEqCore,GROUP=QA: 18/18 passedNoADpreservation assertion: passedgit diff --check: passed