Skip to content

Docs testing part 1#1490

Open
wsmoses wants to merge 9 commits into
masterfrom
wm/dt1
Open

Docs testing part 1#1490
wsmoses wants to merge 9 commits into
masterfrom
wm/dt1

Conversation

@wsmoses

@wsmoses wsmoses commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@wsmoses wsmoses requested a review from ChrisRackauckas June 18, 2026 18:33
@oscardssmith

Copy link
Copy Markdown
Member

@ChrisRackauckas are doctestsnotworking for this repo?

@wsmoses

wsmoses commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@ChrisRackauckas-Claude identify any/all failing doctests and open issues for them as isolated. Also make a patch to this pr reverting any doctest which currently fails [so we can merge all that pass now, and do the rest as follow ups]

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

I isolated the failing docs example blocks from this PR and opened follow-up issues:

I made the requested local patch as commit 389dd081:

Revert failing second-order docs conversions

It reverts only these PR changes back to Mooncake:

  • docs/src/examples/ode/second_order_adjoints.md
  • docs/src/examples/ode/second_order_neural.md

Local verification run on Julia 1.12.6:

timeout 3600 env JULIA_DEPOT_PATH="$PWD/.julia_depot" /home/crackauc/.juliaup/bin/julia +1.12.6 --project -e 'using Pkg; Pkg.activate("docs"); push!(LOAD_PATH, pwd()); using Documenter, SciMLSensitivity; ENV["GKSwstype"]="100"; using Plots; makedocs(; root="docs", sitename="target", modules=[SciMLSensitivity], clean=true, doctest=false, linkcheck=false, warnonly=[:missing_docs], pages=["target" => "examples/ode/second_order_adjoints.md"])'

Result: exited 139 after reverting, so I am not claiming the page passes. The revert does remove the PR-introduced Enzyme runtime-activity error, but the Mooncake/original page still appears to have a separate crash.

I could not push the patch to this branch from this environment:

remote: Permission to SciML/SciMLSensitivity.jl.git denied to ChrisRackauckas-Claude.
fatal: unable to access 'https://github.com/SciML/SciMLSensitivity.jl.git/': The requested URL returned error: 403

SSH push also failed with Permission denied (publickey). A maintainer with branch write access can cherry-pick local commit 389dd081 or apply this equivalent diff:

diff --git a/docs/src/examples/ode/second_order_adjoints.md b/docs/src/examples/ode/second_order_adjoints.md
index 670dd82d..00e4c011 100644
--- a/docs/src/examples/ode/second_order_adjoints.md
+++ b/docs/src/examples/ode/second_order_adjoints.md
@@ -24,7 +24,7 @@ import OrdinaryDiffEq as ODE
 import Plots
 import Random
 import OptimizationOptimJL as OOJ
-import Enzyme
+import Mooncake
@@ -85,7 +85,7 @@ callback = function (state, l; doplot = false)
     return l < 0.01
 end
 
-adtype1 = OPT.AutoEnzyme()
+adtype1 = OPT.AutoMooncake(; config = Mooncake.Config(; friendly_tangents = true))
 optf1 = OPT.OptimizationFunction((x, p) -> loss_neuralode(x), adtype1)
diff --git a/docs/src/examples/ode/second_order_neural.md b/docs/src/examples/ode/second_order_neural.md
index e578cf67..5d12266d 100644
--- a/docs/src/examples/ode/second_order_neural.md
+++ b/docs/src/examples/ode/second_order_neural.md
@@ -29,7 +29,7 @@ import OptimizationOptimisers as OPO
 import RecursiveArrayTools
 import Random
 import ComponentArrays as CA
-import Enzyme
+import Mooncake
@@ -62,7 +62,7 @@ callback = function (state, l)
     l < 0.01
 end
 
-adtype = OPT.AutoEnzyme(; mode = Enzyme.set_runtime_activity(Enzyme.Reverse))
+adtype = OPT.AutoMooncake(; config = Mooncake.Config(; friendly_tangents = true))
 optf = OPT.OptimizationFunction((x, p) -> loss_n_ode(x), adtype)

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Follow-up to my previous comment: I pushed the patch to the fork and opened it as draft PR #1535 against this branch: #1535

@ChrisRackauckas

Copy link
Copy Markdown
Member

The segfault is EnzymeAD/Enzyme.jl#3292

@wsmoses

wsmoses commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@ChrisRackauckas which one is that so we can remove it and check the others work end to end

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.

4 participants