Skip to content

Support NLsolve 5 autodiff in wrapper tests - #1207

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-nlsolve-test-compat
Closed

ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-nlsolve-test-compat

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed

Align the isolated Wrappers test environment with the root package's NLsolve 5 compatibility. Translate the legacy NLsolveJL(autodiff = :central) and :forward values to AutoFiniteDiff and AutoForwardDiff at the NLsolve extension boundary, because NLsolve 5 now requires ADTypes backend objects.

This preserves the existing NLsolveJL public API while allowing the wrapper tests and downstream users to exercise NLsolve 5. The related QA environment resolution failure was fixed separately by #1205 while this investigation was running.

Regression evidence

On the unfixed code, after changing only the Wrappers environment to NLsolve 5 so the group could resolve, the exact test command reached the solver and errored twice:

$ TMPDIR="$HOME/tmp" JULIA_PKG_PRECOMPILE_AUTO=0 GROUP=Wrappers julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
TypeError: in keyword argument autodiff, expected ADTypes.AbstractADType, got a value of type Symbol
...
ERROR: Some tests did not pass: 130672 passed, 0 failed, 2 errored, 0 broken.

With this commit applied on current upstream/master (b46cebec0), the same command passes:

Test Summary:              |   Pass   Total     Time
ForwardDiff.jl Integration | 135631  135631  7m40.3s
...
Test Summary:                   | Pass  Total   Time
Nonlinear Root Finding Problems |   58     58  18.1s
     Testing NonlinearSolve tests passed

Verification

$ TMPDIR="$HOME/tmp" JULIA_PKG_PRECOMPILE_AUTO=0 GROUP=Wrappers julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
# 135631 ForwardDiff integration assertions passed; all remaining Wrappers testsets passed
$ TMPDIR="$HOME/tmp" JULIA_PKG_PRECOMPILE_AUTO=0 GROUP=QA julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
Test Summary: | Pass  Total     Time
QA            |   28     28  4m55.9s
     Testing NonlinearSolve tests passed
$ julia +1.12 --project="$HOME/.julia/environments/runic" -m Runic --check ext/NonlinearSolveNLsolveExt.jl
# exit 0
$ typos ext/NonlinearSolveNLsolveExt.jl test/Wrappers/Project.toml
# exit 0
$ git diff --check upstream/master...HEAD
# exit 0

Docs were not rebuilt because this preserves the documented public API and changes no documentation. GPU and downstream groups were not run locally.

CI status

All six Wrappers jobs pass on Ubuntu and macOS with Julia LTS, stable, and pre-release. The three red ModelingToolkit jobs reproduce unchanged on clean upstream/master in https://github.com/SciML/NonlinearSolve.jl/actions/runs/33108992904 and are dependency regressions unrelated to this two-file change:

The self-hosted CUDA job remained queued after every hosted job completed, so the GPU path was not verified.

Reviewer judgment

This deliberately preserves the accepted symbol spellings and translates them privately. Push back if NLsolveJL should 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).

Align the Wrappers test environment with NLsolve 5 and translate the legacy NLsolveJL autodiff symbols to their ADTypes equivalents.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants