Skip to content

Zygote AD example disabled in documentation due to IntegralSolution adjoint issue #300

Description

@ChrisRackauckas-Claude

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

  • Investigate why the IntegralSolution adjoint is not working
  • Re-enable the Zygote example in documentation once fixed

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions