-
-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
Summary
The Fokker-Planck test in test/additional_loss_tests.jl fails because Zygote lacks adjoint rules for the IntegralSolution constructor from Integrals.jl. This prevents automatic differentiation through integral constraints.
Error
ERROR: Mutating arrays is not supported -- called setindex!(::Vector{Float64}, _...)
The error occurs during Zygote's backward pass when trying to differentiate through the integral solution construction.
Affected Tests
- Fokker-Planck test in
test/additional_loss_tests.jl
Root Cause
The Fokker-Planck test uses an integral constraint (_norm function with Integrals.jl). When Zygote tries to differentiate through this, it encounters the IntegralSolution type which doesn't have proper adjoint rules defined.
Current Status
Test is temporarily skipped in PR #1013 to unblock CI.
Potential Solutions
- Add
ChainRulesCore.@non_differentiablerules forIntegralSolutionconstructor in Integrals.jl or SciMLBase - Use a different approach for integral constraints that doesn't require differentiation through the integral solution
- Contribute adjoint rules for
IntegralSolutionto Integrals.jl
References
- PR Fix compatibility with ModelingToolkit 11, Symbolics 7, and SymbolicUtils 4 #1013 where test was skipped
- Integrals.jl repo for potential adjoint rule contributions
Metadata
Metadata
Assignees
Labels
No labels