-
Notifications
You must be signed in to change notification settings - Fork 232
Use autodiff API based on ADTypes instead of symbols
#1195
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: master
Are you sure you want to change the base?
Conversation
3af16d7 to
3de999b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1195 +/- ##
==========================================
- Coverage 87.48% 86.53% -0.95%
==========================================
Files 45 45
Lines 3517 3514 -3
==========================================
- Hits 3077 3041 -36
- Misses 440 473 +33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| fallback_method(f, g!, h!) = Newton() | ||
|
|
||
| # By default, use central finite difference method | ||
| const DEFAULT_AD_TYPE = ADTypes.AutoFiniteDiff(; fdtype = Val(:central)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could consider switching to a different default AD backend (maybe ForwardDiff for univariate optimization and e.g. Mooncake - if at least all tests pass - for multivariate optimization problems? - but the choice for when to switch to which backend is likely also problem/dimension dependent, see also https://docs.sciml.ai/Optimization/stable/API/ad/#ad). But I think it would be better to make such more fundamental changes in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree both to switch to reverse mode for multivariate and forward for univariate, but also that it's probably a separate PR
3de999b to
9ab4a83
Compare
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
A plot of the benchmark results has been uploaded as an artifact at . |
|
JET complains |
|
I checked it locally, and none of the things JET complains are introduced or changed by the PR. It seems the PR just helps JET to perform its type-signature-based analysis more thoroughly, and hence more problems are revealed 😄 I could fix a few of them in this PR but arguably it might be better to do that in a separate PR. |
Fixes #1187