-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add support for using non-AbstractArrays with OrdinaryDiffEq and Zygote #1092
Conversation
These changes don't look too unreasonble. However, we already support non-AbstractArrays? For parameters we support SciMLStructure types and Functors. If you define the custom type as a SciMLStructure with the right canonicialization dispatch does it just work? |
@ChrisRackauckas Defining the SciMLStructure interface for my custom type as follows:
and running the test on master gives the following error:
Although I'm not sure if I'm doing this correctly, as the docs and tests for SciMLStructures are lacking examples. If it somehow does work, I'm happy to write up a docs example for a simple custom type, as this would save me a ton of work. |
Try setting it to GaussAdjoint? For forward mode, #1085 should've just handled this yesterday. Give master a try? |
@ChrisRackauckas still getting an error. On master, running
gives
|
Maybe the discussion for using SciMLStructures with SciMLSensitivity should be moved to another issue. This PR only deals with using non- |
@ChrisRackauckas pinging in case you missed my above comment |
Rebase this PR onto the latest master. If all went well then this shouldn't need the code changes, just the tests. |
@ChrisRackauckas the tests work with two small changes in |
Continuing my quest to open up SciML to custom non-
AbstractArray
types :). See SciML/StochasticDiffEq.jl#579 and SciML/OrdinaryDiffEq.jl#2368 for more reference.