-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradient on a custom struct doesn't work #30
Gradient on a custom struct doesn't work #30
Comments
Same as, #28 @DhairyaLGandhi how is this going? |
XRef SciML/SciMLSensitivity.jl#1135 It fails a test with a mutation inside the ComponentArrays case for Zygote. Both the docs example and the MTKNN example work with the PR however. |
Ok so basically that PR should fix this problem. Is there a quick fix I can do? Or I should wait for that PR? |
It should be completed like today, or if not, shortly after. Then we merge the doc example #28, and then I think this repo is in a good place. |
Describe the bug 🐞
I defined a very simple struct just to test the SciMLStructures.jl package, but it fails. I tried with the first example in the SciMLSensitivity.jl Documentation, but using a custom struct instead of a vector as parameters.
Expected behavior
Returning the correct gradient.
Minimal Reproducible Example 👇
Working example from SciMLSensitivity.jl
Not Working example with custom structure and SciMLStructures.jl
Struct definition
SciMLStructures.jl methods definition
Function definition
Gradient calculation
Also with Enzyme.jl
Error & Stacktrace⚠️
Zygote Error
Enzyme Error
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
The text was updated successfully, but these errors were encountered: