Skip to content

Fix docs build: import EnsembleProblem/EnsembleThreads in shapley.md - #266

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-docs-build
Aug 26, 2026
Merged

Fix docs build: import EnsembleProblem/EnsembleThreads in shapley.md#266
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-docs-build

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Summary

Fixes the failing Documentation CI build (see failing run).

Root cause: The @example shapley block in docs/src/tutorials/shapley.md uses EnsembleProblem and EnsembleThreads but never imports them. Other tutorials (parallelized_gsa.md, juliacon21.md) explicitly import these via using SciMLBase: EnsembleProblem, EnsembleThreads, but shapley.md was missing this import. With SciMLBase v3, these names are no longer transitively brought into scope through OrdinaryDiffEq's re-exports, so the doc build fails with:

UndefVarError: `EnsembleThreads` not defined in `Main.__atexample__named__shapley`

which then cascades into UndefVarError: shapley_effects not defined in the subsequent example blocks that depend on it, terminating the makedocs build with a [:example_block] error.

Fix: Add the missing using SciMLBase: EnsembleProblem, EnsembleThreads import to the first code block of shapley.md, matching the pattern already used elsewhere in the docs.

Test plan

  • Instantiated docs/ environment locally and reproduced the exact failure (UndefVarError: EnsembleThreads not defined) with the import missing.
  • Applied the fix and ran a scoped smoke test replicating the shapley.md example code (same imports, ODE/NN setup, batched_loss_n_ode, and a gsa(..., Shapley(...)) call with reduced n_perms/n_var/n_outer for speed) — confirms EnsembleProblem/EnsembleThreads resolve correctly and shapley_effects computes successfully end-to-end.
  • Did not run the full docs/make.jl (the untouched tutorial as written trains a Neural ODE for 300 iterations and computes Shapley effects with n_outer up to 100, which is prohibitively slow for local verification), but the fix is a one-line addition identical to the working pattern used in two other tutorials in this same repo.

Made with Cursor

The shapley.md tutorial's @example block uses EnsembleProblem and
EnsembleThreads but never imports them, unlike parallelized_gsa.md
and juliacon21.md which explicitly import via
`using SciMLBase: EnsembleProblem, EnsembleThreads`.

With SciMLBase v3, these names are no longer transitively brought
into scope by OrdinaryDiffEq's re-exports, so the doc build fails
with UndefVarError: EnsembleThreads not defined, which cascades into
UndefVarError: shapley_effects not defined in the following blocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ChrisRackauckas
ChrisRackauckas merged commit c440790 into SciML:master Aug 26, 2026
4 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