-
-
Notifications
You must be signed in to change notification settings - Fork 156
Stateful Controls #604
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
base: main
Are you sure you want to change the base?
Stateful Controls #604
Conversation
* _integrate.py * Added new test checking gradient of vmapped diffeqsolve * Import optimistix * Fixed issue * added .any() * diffrax root finder
in python-poetry ~=3.9 is interpreted as >=3.9<3.10 [2], though it should be >=3.9,<4.0 [2] https://python-poetry.org/docs/dependency-specification/
* _integrate.py * Added new test checking gradient of vmapped diffeqsolve * Import optimistix * Fixed issue * added .any() * diffrax root finder
in python-poetry ~=3.9 is interpreted as >=3.9<3.10 [2], though it should be >=3.9,<4.0 [2] https://python-poetry.org/docs/dependency-specification/
I would be very interested in this. Is there any plan to continue on it :)? |
I will do my best to keep it up to date (as I do with all my PRs, even those that are a year old #463). We have some internal tools that also depend on this branch (so I think it should be a little stable). I think the only outstanding real bug/issue is the weird edge case that cause a assertion error with direct adjoint on problems with enough steps (which I haven't dug into since I haven't been working a ton with diffrax this year so far). However, this introduces quite some changes, so the timeline is long. I have a fork of diffrax that has additional features/solvers and I was thinking this could be part of it as well, although with how much other stuff is going on, I'm not sure that timeline is any shorter lol. |
Dear Lockwo, thanks for the comment and the explanation. I can imagine that this has a long tail. I think I am not enough into the topic to support you here. But in any case, you work is much appreciated! If there are any updates I would be happy to use it. As of now I think I need to drop |
Yup, this branch is still something I have an eye on. I'm tentatively thinking that after reversible adjoints are in (#603) then this is a good candidate for the next 'big' thing I'm thinking about. Right now I'm not sure if that will mean stateful controls or something else, since the main downstream goal is a performance improvement for SDEs, and perhaps this is a thing we can obtain in some other way. Either way, a problem for future Patrick 😄 |
This is the v1 of the stateful control PR.
This PR introduces a suite of internally breaking changes which allow for stateful paths. To the non-advanced user, this will likely have no impact on the way they interact with diffrax. It should not impact ODE users at all. SDEs users may be impacted as they might want to try the new "UnsafeBrownianPath" (or as I am calling it "DirectBrownianPath" since it isn't really that unsafe any more), but this should just allow for faster code. I tried several approaches to this problem, but I think based on the conversations in other issues (e.g. #548), that this is at least someone an aligned vision.
Functionaly, this was just a lot of adding arguments to things to support an extra path_state variable. Hence the internal breaking changes. However, these breaking changes come with some decent motivation:
Currently, this PR is missing a few things though.
For more context, see the original PR: #559