-
-
Notifications
You must be signed in to change notification settings - Fork 237
Symbolic indexing rework #1988
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
Symbolic indexing rework #1988
Conversation
|
Those look good. Is that all that's required for the full interface? |
|
I just realised this is a bit of a circular dependency problem. SciMLBase can't use these functions, because MTK depends on it and not the other way around. |
|
Yes, any interface functions must be defined in SciMLBase and extended downstream. |
|
Do I move |
|
Define stub functions and use them in the interface, and they get extended downstream. |
|
With some changes (which I'm cleaning up) symbolic indexing of solutions works. However, |
|
Then we should define the interface in RecursiveArrayTools as something about |
|
The solutions I've come up with so far:
|
|
DiffEqArray doesn't seem to support indexing with multiple symbols. The following doesn't work (example uses literal symbols instead of symbolic variables for convenience): julia> dx = DiffEqArray([[f(x) f2(x)] for x in t], t, [:a,:b])
julia> dx[[:a,:b]]
ERROR: DimensionMismatch: arrays could not be broadcast to a common size; got a dimension with lengths 11 and 2
...Is this intentional? |
|
I've messed about with this a lot (going the |
|
At that point it's a whole package. SymbolicIndexingInterface.jl? Document it well enough and it can be a thing. |
|
That sounds like a good idea. It would be pretty small to start: |
|
Make it work, get it tested, and then in a last step refactor to a new package and we move it to SciML to register. |
- Don't pass syms to `SciMLFunction`s - Import, reexport and overload interface methods from RecursiveArrayTools - FIXME: Currently unrelated `states`/`parameters` are also overloaded
|
SciMLBase tests pass if the following is done:
|
|
Alright cool, seems like a good time to make that extra package then. |
|
Everything that needs to be in the package is in |
|
Initiated the transfer. Github says it might take a couple minutes |
|
Should I tag a release for SymbolicIndexingInterface, so the other packages can depend on it? |
|
I set it to go. |
- SymbolicIndexingInterface.jl is registered, and contains all the interface methods previously defined in RecursiveArrayTools - SymbolicIndexingInterface is imported and not `using` so unexported `states` and `parameters` functions shouldn't need to unnecessarily overload the interface
|
This should work. For some reason I can't install SymbolicIndexingInterface locally yet. It won't work in CI, however, since it doesn't know to depend on the specific SciMLBase and RecursiveArrayTools branches without Manifest.toml |
|
Can I rename the other |
yes |
|
Is there a case where EDIT: Same thing in |
|
Everything should work now, bar the tests mentioned above, if the relevant branches of the other repositories are used. I haven't been able to run the distributed tests since Distributed tends to segfault on my system for reasons I haven't figured out yet. |
|
Should this PR still pass |
|
Yes, and then do an upper bound in the second PR. That way it's all done safely. |
|
Done. Now SciMLBase can be updated to 1.80 without MTK trying to use it EDIT: Wait, I got it wrong. There's no need to restrict this since SciMLBase should support the old method anyway |
c1aaf04 to
824b300
Compare
|
Once this merges, SciMLBase can depend on it, so those changes can be tested and then merged |
Is this interface appropriate?