Allow generic solver to be passed to Newton method#1176
Allow generic solver to be passed to Newton method#1176rsenne wants to merge 15 commits intoJuliaNLSolvers:masterfrom
Conversation
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
|
Thanks, I'll review :) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1176 +/- ##
==========================================
+ Coverage 85.70% 85.75% +0.04%
==========================================
Files 46 46
Lines 3596 3601 +5
==========================================
+ Hits 3082 3088 +6
+ Misses 514 513 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| g = gradient(d) | ||
|
|
||
| # Clean and simple - just call the user's solve function | ||
| state.s .= method.solve(H, g) |
There was a problem hiding this comment.
For the default solver, this seems less efficient than the current implementation. AFAICT this would introduce a regression as currently for Arrays both the cholesky decomposition of the Hessian is computed in place and then also the in-place ldiv! solver is used.
|
Hi @devmotion. You're right that's my mistake. In honesty I somewhat forgot what I was doing on this PR so my apologies for the late reply. I think i have fixed the regression I introduced. Let me know if there are any other issues |
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
A plot of the benchmark results has been uploaded as an artifact at . |
Co-authored-by: David Müller-Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Müller-Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Müller-Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Müller-Widmann <devmotion@users.noreply.github.com>
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
A plot of the benchmark results has been uploaded as an artifact at . |
This PR is in reference to issue #1170. To solve this I have edited the interface to allow a user to pass a generic solver. This in theory would allow one to use any matrix type given the user has that package loaded and there exists a solver designed for that matrix type on board. This also allows one to write a custom solver (i.e., problem specific factorization, strategies for solving) to circumvent the default behavior. I have included some examples of this in testing including:
Let me know if there are any other tests you would like me to include or changes to the documentation.