-
-
Notifications
You must be signed in to change notification settings - Fork 100
Cleanup for OptimizationBase #1071
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
Conversation
@ChrisRackauckas is this one okay? |
Should I change the CI setup so that Core uses the PR version of OptimizationBase instead of the release, now that most things are in OptimizationBase? |
It's supposed to via sources, but yeah 😅 changing the CI could help |
We can't really test the Core group without the updates to Btw, it looks like we were not running the OptimizationBase tests at all 😅 |
That's fine, because OptimizationBase.jl cannot really be used without a solver. So the real thing is the bump of the solver compats for this. |
well, since this is a breaking change, I think we're fine to merge if there isn't anything else to add here. |
I'd just make sure we have an easy way to also dispatch on in placeness of |
I'm not sure I fully understand what should I add 😅 For
and for
we don't have the out of place variant. Should I (ask claude to) add those? As far as I can tell all optimizers use the in-place version, so the out of place stuff is never used. I would assume that it could be interesting for applications that don't support mutation, but in that case we would need support from the optimizers (do we need a trait for that?). Otherwise if we implement the closure passed to the optimizer as in-place based on an out of place Optimization function, we would have to more or less duplicate all implementations. There's also the MultiObjective stuff, but I would assume that it would need #1017 merged first, we have there the option of having an in-place objective function, and that would also need to pass the appropriate iip/oop function to the underlying optimizer. |
Static and GPU kernel optimizers will need it. So OptimizationFunction has an IIP, and we should make it easy to dispatch the cache on that. |
so something like
? |
but lift that type parameter to the OptimizationCache as the second type parameter |
Since we always dispatch on the optimizer, it makes much more sense to have this as the first argument (and first type parameter)
this is for changing the order of the fields in the OptimizationCache
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
7878d06
to
3480bab
Compare
done & rebased on master |
I'm splitting up the changes to OptimizationBase from #1067 here
I think we can also do the supports_opt_cache_interface cleanup in this PR too.
After SciML/SciMLBase.jl#1157 merges we can replace
supports_opt_cache_interface
with the new API.