Skip to content

Fix Turing 0.40 compatibility: use AbstractSciMLProblem type#359

Merged
ChrisRackauckas merged 2 commits intoSciML:masterfrom
ChrisRackauckas-Claude:fix-turing-040-compatibility
Jan 6, 2026
Merged

Fix Turing 0.40 compatibility: use AbstractSciMLProblem type#359
ChrisRackauckas merged 2 commits intoSciML:masterfrom
ChrisRackauckas-Claude:fix-turing-040-compatibility

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

  • Fixed turing_inference function signature to accept SciMLBase.AbstractSciMLProblem instead of DiffEqBase.DEProblem
  • This resolves CI failures with Turing 0.40 where SteadyStateProblem is now a subtype of AbstractNonlinearProblem rather than AbstractDEProblem

Root Cause

In Turing 0.40 / recent SciML ecosystem changes, SteadyStateProblem moved from being a subtype of AbstractDEProblem to AbstractNonlinearProblem. The turing_inference function was typed to only accept DEProblem, causing a MethodError when used with SteadyStateProblem.

Solution

Changed the type signature from:

function turing_inference(prob::DiffEqBase.DEProblem, ...)

to:

function turing_inference(prob::SciMLBase.AbstractSciMLProblem, ...)

This accepts both AbstractDEProblem (ODE/SDE/etc) and AbstractNonlinearProblem (including SteadyStateProblem).

Related

This supersedes the compat-only change in #358 by including the necessary code fix.

🤖 Generated with Claude Code

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 1 to +2
function turing_inference(
prob::DiffEqBase.DEProblem,
prob::SciMLBase.AbstractSciMLProblem,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Import/add SciMLBase for new type annotation

The new annotation SciMLBase.AbstractSciMLProblem relies on the SciMLBase module being in scope, but this package neither imports SciMLBase nor lists it as a dependency. In a clean environment, SciMLBase will be undefined in DiffEqBayes, so loading the module or parsing this method triggers UndefVarError: SciMLBase not defined. To avoid a load-time failure, add SciMLBase to [deps] and using SciMLBase (or switch to a type that is already in scope).

Useful? React with 👍 / 👎.

CompatHelper Julia and others added 2 commits January 6, 2026 09:09
SteadyStateProblem is now a subtype of AbstractNonlinearProblem
rather than AbstractDEProblem in the SciML ecosystem. Changed the
function signature to accept AbstractSciMLProblem which supports
both problem types.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude force-pushed the fix-turing-040-compatibility branch from e3d5c3c to 64b32d8 Compare January 6, 2026 14:09
@ChrisRackauckas ChrisRackauckas merged commit 10c6c74 into SciML:master Jan 6, 2026
7 of 10 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.

3 participants