Skip to content

Fix showcase doc breakages: SRIW1 import + 3-arg prob_func#337

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:fix/sde-prob-func-docs-breakages
May 10, 2026
Merged

Fix showcase doc breakages: SRIW1 import + 3-arg prob_func#337
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:fix/sde-prob-func-docs-breakages

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown

Please ignore until reviewed by @ChrisRackauckas.

The Documentation build on main is failing (and has been since the OrdinaryDiffEq v7 / DifferentialEquations v8 compat bumps in #334 / #335). Failing run that triggered this fix: https://github.com/SciML/SciMLDocs/actions/runs/25586532463/job/75116106072

Summary

Three showcase pages were broken by recent compat bumps:

  1. gpu_spde.mdDE.SRIW1() failed with UndefVarError: SRIW1 not defined in DifferentialEquations. DifferentialEquations.jl v8 only @reexports SciMLBase and OrdinaryDiffEq, so the StochasticDiffEq solvers are no longer available through the DE alias. Fix: import StochasticDiffEq directly in that block (added to docs/Project.toml with compat "6").
  2. massively_parallel_gpu.mdprob_func = (prob, ctx) -> ... failed with MethodError: no method matching (...)(::ODEProblem, ::Int64, ::Int64). The current SciMLBase ensemble interface calls prob_func(prob, i, repeat) (3 args). Fix: update the closure to the 3-arg signature. The cascading errors at lines 95-98 and 103-106 reuse the same monteprob, so only one edit is needed.
  3. optimization_under_uncertainty.md — same root cause; prob_func(prob, ctx) becomes prob_func(prob, i, repeat). The downstream UndefVarError: ensemblesol and the three subsequent MethodErrors on prob_func all flow from this single definition.

Test plan

  • CI Documentation job is green (the only realistic verification — the build needs the self-hosted GPU runner)
  • After merge, the published showcase pages render the SPDE / GPU-ensemble / optimization-under-uncertainty examples again

DifferentialEquations.jl v8 only re-exports SciMLBase + OrdinaryDiffEq,
so SRIW1 is no longer reachable via DE.SRIW1. Import StochasticDiffEq
directly in the SPDE block (and add it to docs/Project.toml).

The SciMLBase v3 ensemble interface calls prob_func with (prob, i, repeat).
Update the two showcase prob_func definitions that still used the old
2-arg (prob, ctx) signature, which the existing batch_func no longer
supplies.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review May 10, 2026 12:04
@ChrisRackauckas ChrisRackauckas merged commit 5b165af into SciML:main May 10, 2026
4 checks passed
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/SciMLDocs that referenced this pull request May 11, 2026
Upstream is now unblocked (AdvancedHMC 0.8.4 dropped the OrdinaryDiffEq
umbrella dep, StochasticDiffEq 7.0.0 is registered with the DiffEqBase 7
ecosystem). Resolution now cleanly yields:

  OrdinaryDiffEq 7.0.0, OrdinaryDiffEqLowOrderRK 2.1.0,
  OrdinaryDiffEqStabilizedRK 2.1.0, StochasticDiffEq 7.0.0,
  SciMLBase 3.9.1, DiffEqBase 7.3.0, AdvancedHMC 0.8.4,
  DifferentialEquations 8.0.0.

- Pin OrdinaryDiffEq = "7" and StochasticDiffEq = "7" so the resolver
  must land on the trimmed v7 stack the migration was designed for.
- Revert the prob_func arity in the two showcase EnsembleProblem
  examples to the 2-arg `(prob, ctx)` form. SciMLBase v3 calls
  prob_func with `(prob, ctx::EnsembleContext)`; the earlier
  `(prob, i, repeat)` form (added in SciML#337 against SciMLBase v2.x) now
  errors as MethodError. The closures don't read i/repeat, so just
  taking `ctx` (and `ctx.sim_id` / `ctx.repeat` when needed) is
  forward-compatible.

Verified locally on the v7 stack: smoke-test mirroring each migrated
import block + first solve call passes, including the EnsembleProblem
path.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas added a commit that referenced this pull request May 12, 2026
DifferentialEquations.jl v8 only re-exports SciMLBase + OrdinaryDiffEq,
and OrdinaryDiffEq v7 trims its umbrella exports to Tsit5/Vern6-9/
Rosenbrock23/Rodas5P/FBDF only. The remaining `import DifferentialEquations
as DE` callsites that touched RK4/ROCK2/etc would silently break the
moment the resolver picks OrdinaryDiffEq v7. Migrate every executable
showcase to the per-sub-package idiom DiffEqDocs already uses:

  - import OrdinaryDiffEq as ODE for umbrella ODE algorithms
  - import OrdinaryDiffEqLowOrderRK for RK4
  - import OrdinaryDiffEqStabilizedRK for ROCK2
  - import StochasticDiffEq as SDE for SRIW1 (already done in #337)
  - import SciMLBase for EnsembleProblem/EnsembleThreads/terminate!
    (these aren't in OrdinaryDiffEq's `using SciMLBase: ...` list)

docs/Project.toml pins DifferentialEquations to "8" and OrdinaryDiffEq
to "6.111, 7" so the resolver is allowed to pick the trimmed v7 once
upstream blockers (currently AdvancedHMC 0.8 capping at v6.111) lift.
The two new sub-packages are added with compat "1, 2".

Verified locally: a fresh env on the new Project.toml resolves
DE 8.0.0 + OrdinaryDiffEq 6.111.0 + SciMLBase 2.155.1, and a smoke
test mirroring each migrated import block + first solve call passes.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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