Repository navigation
Translate NLsolveJL autodiff symbols for NLsolve 5 - #1209
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Preserve the documented NLsolveJL symbol interface by converting its legacy central and forward choices to the corresponding ADTypes backends before constructing the NLsolve objective. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.150.1 Agent-Model: unknown Agent-Session: local session ID 01a04445-104e-7dc1-bae7-03b57aaf3462
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.
What changed and why
NLsolve 5 migrated its
autodiffkeyword from symbols to ADTypes backends, while the documentedNLsolveJLinterface still accepts:centraland:forward. Translate those two legacy values at the extension boundary toAutoFiniteDiff(fdtype = Val(:central))andAutoForwardDiff()respectively, preserving the public wrapper API.The existing explicit symbol checks are grouped into a named parameterized regression test so both accepted spellings remain covered without duplicating the test body.
Regression evidence
On clean
upstream/masterat0057ea080b5c12e1fd10eb8152a35a3bf01eecf4, the full Julia 1.10 Wrappers group failed twice inforward_ad_tests__item1.jl:With this commit applied, the same command passes:
The standalone regression also failed on the unfixed commit with NLsolve 5.0.1 and passed after the fix for both
autodiff = :centralandautodiff = :forward.Bisect
git bisectidentified4a2745620f2fd0829a7aadd669c07a3fba3ac53cas the first bad commit. Its parent resolves the supported NLsolve 4.5.1 and both symbol modes solve successfully; that commit changes root compatibility to NLsolve 5, which raises the type error. PR #1208 later aligned the Wrappers sub-environment with NLsolve 5 and exposed the existing incompatibility in that CI group.Verification
Docs were not rebuilt because this changes neither public API nor documentation. GPU and downstream groups were not run locally.
Reviewer judgment
This preserves the currently documented symbol interface through a private translation. Push back if
NLsolveJLshould instead make a breaking public API change to require ADTypes objects.Links
🤖 Generated with Codex CLI 0.150.1 (model: unknown; session: local session ID 01a04445-104e-7dc1-bae7-03b57aaf3462).