Use autodiff API based on ADTypes instead of symbols#1195
Use autodiff API based on ADTypes instead of symbols#1195pkofod merged 1 commit intoJuliaNLSolvers:masterfrom
autodiff API based on ADTypes instead of symbols#1195Conversation
3af16d7 to
3de999b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1195 +/- ##
==========================================
+ Coverage 87.42% 87.45% +0.02%
==========================================
Files 45 45
Lines 3548 3548
==========================================
+ Hits 3102 3103 +1
+ Misses 446 445 -1 ☔ 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.
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.
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. |
|
#1209 fixes the JET errors on the master branch. |
1374416 to
a79c2a4
Compare
Fixes #1187