Move FiniteDiffDerivative to test utils, remove from public API#2094
Move FiniteDiffDerivative to test utils, remove from public API#2094
Conversation
Memory benchmark result| Test Name | %Δ | Master (MB) | PR (MB) | Δ (MB) | Time PR (s) | Time Master (s) |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
test_objective_jac_w7x | 1.18 % | 3.888e+03 | 3.934e+03 | 45.87 | 40.47 | 36.53 |
test_proximal_jac_w7x_with_eq_update | -1.77 % | 6.640e+03 | 6.523e+03 | -117.26 | 166.64 | 161.38 |
test_proximal_freeb_jac | -0.08 % | 1.322e+04 | 1.321e+04 | -11.13 | 85.32 | 83.00 |
test_proximal_freeb_jac_blocked | -0.35 % | 7.510e+03 | 7.483e+03 | -26.59 | 75.48 | 73.56 |
test_proximal_freeb_jac_batched | -0.39 % | 7.507e+03 | 7.478e+03 | -29.23 | 73.86 | 72.86 |
test_proximal_jac_ripple | 1.66 % | 3.499e+03 | 3.558e+03 | 58.19 | 67.47 | 66.06 |
test_proximal_jac_ripple_bounce1d | 1.39 % | 3.544e+03 | 3.593e+03 | 49.29 | 76.71 | 77.02 |
test_eq_solve | 0.18 % | 2.027e+03 | 2.031e+03 | 3.67 | 94.51 | 94.87 |For the memory plots, go to the summary of |
desc/derivatives.py
Outdated
|
|
||
| from abc import ABC, abstractmethod | ||
|
|
||
| import jax |
There was a problem hiding this comment.
I think during the dev meeting, we decided to keep the backend flexible for other autodiff libraries, so I think the conditional if use_jax is still useful. To be honest, I think that is a very distant future (so not very important for now) but everywhere in the code, we omit importing jax directly, so for consistency, having the conditional is better imo.
There was a problem hiding this comment.
Ah right sorry, I will revert that
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2094 +/- ##
========================================
Coverage 94.52% 94.53%
========================================
Files 102 102
Lines 28785 28654 -131
========================================
- Hits 27210 27087 -123
+ Misses 1575 1567 -8
🚀 New features to boost your workflow:
|
ddudt
left a comment
There was a problem hiding this comment.
I still think we could remove the FiniteDiffDerivative class completely and replace it with something simpler, since it is only used in the testing functions. But this is fine for now.
No description provided.