Use SciMLSensitivity automatic sensealg choice - #246
Merged
ChrisRackauckas merged 1 commit intoAug 28, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
Drop DeepEquilibriumNetworks' SteadyStateAdjoint/GaussAdjoint override and call solve with sensealg = nothing so SciMLSensitivity picks the adjoint. User-supplied sensealg kwargs still override. GPUArraysCore returns to a test extra. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Grok <noreply@x.ai> Agent-Harness: Grok Build Agent-Model: grok-4.6 Agent-Session: local session ID 01a045fe-9bed-73c2-8681-bb5d74884034
ChrisRackauckas
marked this pull request as ready for review
August 28, 2026 03:36
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.
What changed and why
DeepEquilibriumNetworks no longer overrides SciMLSensitivity's automatic
sensealgchoice.solveis called withsensealg = nothing; a user-suppliedsensealgin the layer constructor kwargs still wins. SciMLSensitivity is still imported so thesolveadjoint rrules load.For the out-of-place
SteadyStateProblems this package constructs, that automatic choice isSteadyStateAdjoint(autodiff = false, autojacvec = ZygoteVJP()). The previous override keptautodiff = trueon CPU (constructor default) and truncated the adjoint linear solve (maxiters = 10,1e-3tols). GPUArraysCore returns to a test extra; it was only needed for the GPUautodiffdispatch in the removed override.This supersedes the GPU-only autodiff flip in #243: SciMLSensitivity already sets
autodiff = falsefor GPU and out-of-place problems.Verification
Runic on the changed
.jlfiles andtyposover the diff both succeeded with no findings.Docs:
makedocscompleted doctest, template expansion, citations, and document checks. The subsequentlinkcheckstep failed on a pre-existing ColPrac GitHub URL with HTTP 429 (rate limit), not on the api.md change. Two arXiv HTTP→HTTPS 301 warnings are also pre-existing.Not verified locally
No CUDA GPU on this host, so the GPU test group was not run. Allowed-to-fail / downstream jobs were not run.
Behavior change
On large states (
length(u0) > 50) this is not a no-op: the old truncated Krylov kwargs produced a different adjoint than SciMLSensitivity's default linear solve. That is intentional; the truncated solve was a DEQ-specific cheap adjoint, not a better general choice.🤖 Generated with Grok Build (model: grok-4.6)
Agent-Session: local session ID 01a045fe-9bed-73c2-8681-bb5d74884034