Skip to content

Add AutoDespecialize parameter policy - #1514

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/auto-despecialize
Aug 11, 2026
Merged

Add AutoDespecialize parameter policy#1514
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/auto-despecialize

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

What changed

Adds AutoDespecialize as a specialization policy distinct from both the unchanged AutoSpecialize policy and the constrained AutoRespecialize policy. Supporting solvers can use it to place arbitrary parameter objects behind the existing DespecializedParameters dynamic function barrier, while transformations can opt out through unwrap_parameters.

The new public marker is documented and included in the specialization preference allowlist. This is a minor public API addition, so the package version advances to 3.46.0.

Verification

Before this commit, the public marker discriminator failed:

$ julia +release --project=. -e 'using SciMLBase; @assert SciMLBase.AutoDespecialize <: SciMLBase.AbstractSpecialization'
ERROR: UndefVarError: `AutoDespecialize` not defined in `SciMLBase`

After this commit:

$ julia +release --project=. -e 'using SciMLBase; @assert SciMLBase.AutoDespecialize <: SciMLBase.AbstractSpecialization; @assert SciMLBase.AutoSpecialize !== SciMLBase.AutoDespecialize; @assert SciMLBase.AutoRespecialize !== SciMLBase.AutoDespecialize; println("AutoDespecialize marker: pass")'
AutoDespecialize marker: pass
$ GROUP=Core julia +release --project=. -e 'using Pkg; Pkg.test()'
Despecialized Parameters | 42 passed
Public interface checks | 552 passed
Remake | 4430 passed
Testing SciMLBase tests passed
$ GROUP=QA julia +release --project=. -e 'using Pkg; Pkg.test()'
QA | 51 passed | 51 total
Testing SciMLBase tests passed

The exact docs build on current master reaches CheckDocument and then fails only on the 16 pre-existing Problem_Traits HTTP 403 links. With the focused existing fix from #1485 stacked locally, the same command completes doctests, cross-references, rendering, and link checking with exit 0:

$ julia +release --project=docs docs/make.jl
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: Automatic `version="3.46.0"` for inventory from ../Project.toml

Runic 1.7, typos over the changed files, and git diff --check all exit 0.

Not verified here

Solver-side automatic wrapping and precompilation are intentionally separate changes in DiffEqBase/OrdinaryDiffEq. ModelingToolkit's default selection and parameter-interface forwarding are also separate so each ownership boundary remains independently reviewable.

Draft: ignore until reviewed by @ChrisRackauckas.

Links

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 11, 2026 08:23
@ChrisRackauckas
ChrisRackauckas merged commit 60ae0fb into SciML:master Aug 11, 2026
47 of 63 checks passed
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