Summary
The Zygote.jl example in the documentation (docs/src/tutorials/differentiating_integrals.md) has been changed to a non-executable code block because Zygote.gradient fails with:
Need an adjoint for constructor SciMLBase.IntegralSolution{...}
This was done in PR #299 to fix the documentation build.
Error Details
When running:
using Integrals, Zygote
f(x, p) = sum(sin.(x .* p))
domain = (ones(2), 3ones(2))
p = ones(2)
function testf(p)
prob = IntegralProblem(f, domain, p)
sin(solve(prob, HCubatureJL(), reltol = 1e-6, abstol = 1e-6)[1])
end
Zygote.gradient(testf, p) # Fails
The error indicates that Zygote needs a constructor adjoint for IntegralSolution that is either missing or not being loaded correctly.
Related Issues
Action Items
🤖 Generated with Claude Code
Summary
The Zygote.jl example in the documentation (
docs/src/tutorials/differentiating_integrals.md) has been changed to a non-executable code block becauseZygote.gradientfails with:This was done in PR #299 to fix the documentation build.
Error Details
When running:
The error indicates that Zygote needs a constructor adjoint for
IntegralSolutionthat is either missing or not being loaded correctly.Related Issues
Action Items
🤖 Generated with Claude Code