Repository navigation
Continue polyalgorithm after stalled least-squares solves - #1204
ChrisRackauckas merged 1 commit into
Conversation
Make cache-based solve! match the direct and step!-driven polyalgorithm paths by escalating past StalledSuccess. Add a bounded nonlinear least-squares regression that discriminates the cache mismatch. 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 01a0441e-3d2f-7170-ab6e-58ef72975a9f
10bb40a to
3975faa
Compare
|
The ModelingToolkit Initialization downstream failure is unrelated to this PR's NonlinearSolve changes. The job checked out current ModelingToolkit master at A separate clean current-master environment with NonlinearSolve master developed through the same five package paths resolved the same versions: ModelingToolkitBase 1.68.1, NonlinearSolve 4.28.1, and SymbolicUtils 4.46.0. The owning-package fix and its fail-before/pass-after reproducer are already in JuliaSymbolics/SymbolicUtils.jl#1033; no duplicate NonlinearSolve change is needed. Local full-group execution was stopped before its terminal assertion to return this classification promptly; the linked CI job itself is the exact clean-current-master reproduction. 🤖 Comment generated with Codex CLI 0.150.1 (model: unknown; session: local session ID 01a0441e-3d2f-7170-ab6e-58ef72975a9f) |
Only despecialize when the problem asks for it Release the accumulated source changes. Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude <[email protected]>
- Render cache accessor docs (#1196) - Drop stale [compat] majors older than one year (#1198) - Drop @fastmath from L2_NORM/Linf_NORM so isfinite guards survive (#1182) - Release 4.28.1 (#1202) - Release 2.48.1 (#1206) - Align QA NLsolve compat with root project (#1205) - Widen NonlinearSolveBase LogExpFunctions compat to 0.3.28–1 (#1203) - Continue polyalgorithm after stalled least-squares solves (#1204) - Align Wrappers NLsolve compat with root project (#1208) - Release 2.48.2 (#1210) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
- Render cache accessor docs (#1196) - Drop stale [compat] majors older than one year (#1198) - Drop @fastmath from L2_NORM/Linf_NORM so isfinite guards survive (#1182) - Release 4.28.1 (#1202) - Release 2.48.1 (#1206) - Align QA NLsolve compat with root project (#1205) - Widen NonlinearSolveBase LogExpFunctions compat to 0.3.28–1 (#1203) - Continue polyalgorithm after stalled least-squares solves (#1204) - Align Wrappers NLsolve compat with root project (#1208) - Release 2.48.2 (#1210) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
- Drop stale [compat] majors older than one year (#1198) - Drop @fastmath from L2_NORM/Linf_NORM so isfinite guards survive (#1182) - Release 4.28.1 (#1202) - Release 2.48.1 (#1206) - Align QA NLsolve compat with root project (#1205) - Widen NonlinearSolveBase LogExpFunctions compat to 0.3.28–1 (#1203) - Continue polyalgorithm after stalled least-squares solves (#1204) - Align Wrappers NLsolve compat with root project (#1208) - Release 2.48.2 (#1210) - Preserve despecialized parameters during reinit (#1199) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
- Drop stale [compat] majors older than one year (#1198) - Drop @fastmath from L2_NORM/Linf_NORM so isfinite guards survive (#1182) - Release 4.28.1 (#1202) - Release 2.48.1 (#1206) - Align QA NLsolve compat with root project (#1205) - Widen NonlinearSolveBase LogExpFunctions compat to 0.3.28–1 (#1203) - Continue polyalgorithm after stalled least-squares solves (#1204) - Align Wrappers NLsolve compat with root project (#1208) - Release 2.48.2 (#1210) - Preserve despecialized parameters during reinit (#1199) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
- Render cache accessor docs (#1196) - Drop stale [compat] majors older than one year (#1198) - Drop @fastmath from L2_NORM/Linf_NORM so isfinite guards survive (#1182) - Release 4.28.1 (#1202) - Release 2.48.1 (#1206) - Align QA NLsolve compat with root project (#1205) - Widen NonlinearSolveBase LogExpFunctions compat to 0.3.28–1 (#1203) - Continue polyalgorithm after stalled least-squares solves (#1204) - Align Wrappers NLsolve compat with root project (#1208) - Release 2.48.2 (#1210) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
- Render cache accessor docs (#1196) - Drop stale [compat] majors older than one year (#1198) - Drop @fastmath from L2_NORM/Linf_NORM so isfinite guards survive (#1182) - Release 4.28.1 (#1202) - Release 2.48.1 (#1206) - Align QA NLsolve compat with root project (#1205) - Widen NonlinearSolveBase LogExpFunctions compat to 0.3.28–1 (#1203) - Continue polyalgorithm after stalled least-squares solves (#1204) - Align Wrappers NLsolve compat with root project (#1208) - Release 2.48.2 (#1210) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Ignore this draft until reviewed by @ChrisRackauckas.
What changed and why
Cache-based
solve!(init(prob))returned immediately when the first nonlinear least-squares polyalgorithm rung reportedStalledSuccess. Directsolve(prob)and the step-driven cache path already treat that result as a reason to try the next rung. This makes the cache path follow the same rule and adds a bounded nonlinear least-squares regression covering the mismatch.The bug was exposed by LinearSolve's rank-deficient QR fallback in SciML/LinearSolve.jl@f15353ac. CurveFit's bounded
nonlinfit_reinitcache returned[1.578e-12, 9.825684, 1.745e-18]with residual norm8.10367, while direct solve escalated and found[3.0, 2.0, 0.7]with residual norm1.78e-14.Failing before
Passing after
CurveFit's original reproducer with this NonlinearSolveBase checkout produced:
Verification
After rebasing over the current upstream releases and the merged QA compat correction #1205:
Fresh CI on this rebased head passes Linux Core on Julia lts, current, and pre; QA; PolyAlgorithms; Bounds; Adjoint; Downstream; Trim; Verbosity; documentation; downgrade; formatting; spelling; and the completed sublibrary jobs.
CI failure classification
The six completed red checks reproduce independently of this polyalgorithm change:
Base.ImmutableDict{DataType, Any}appearing where scope/name tuples are expected. The focused SymbolicUtils fix Fix nested ImmutableDict metadata updates JuliaSymbolics/SymbolicUtils.jl#1033 has a fail-before/pass-after regression and passes SymbolicUtils Core with 17,887 tests; the same checkout also passes the affected SymbolicAnalysis groups.Tracker/LogExpFunctions failures from the pre-rebase head are resolved by merged #1203; exact current-master Simple Core and Adjoint runs pass.
macOS and CUDA jobs remain queued for lack of runners at the time of this update.
Not verified
GPU, adjoint, bounds-extension, downstream, trim, and full
Everythinggroups were not run locally for this branch. Documentation was not built locally because no public API or documentation changed.Reviewer note
The behavioral choice is limited to
NonlinearSolvePolyAlgorithm: aStalledSuccessrung now escalates exactly as the direct-solve and step-driven paths already do. If every rung stalls or fails, the existing lowest-residual selection remains unchanged.Links
🤖 Generated with Codex CLI 0.150.1 (model: unknown; session: local session ID 01a0441e-3d2f-7170-ab6e-58ef72975a9f).