feat: add optimistix optimizer - #2678
Conversation
|
this looks ok to me.. just had minor comments.. |
|
Ok, now it seems like I have to skip the optimistix tests for py<3.11 test suites. Do you have a suggestion where to apply such skips? I also see there's a constraint.txt in tests/ but I'm not sure if this is somehow related? |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2678 +/- ##
==========================================
- Coverage 98.28% 98.03% -0.25%
==========================================
Files 65 66 +1
Lines 4305 4386 +81
Branches 465 469 +4
==========================================
+ Hits 4231 4300 +69
- Misses 46 57 +11
- Partials 28 29 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
once tests are fixed and running, can go in. |
01dc9c0 to
c4c5ade
Compare
- Add test_optimistix_no_solver, test_optimistix_wrong_backend, test_optimistix_minimize, test_optimistix_minimize_fixed_params, test_optimistix_return_result_obj to test_optim.py - Add optimistix entry to test_missing_optimizer parametrize in test_init.py Co-Authored-By: Giordon Stark <kratsg@gmail.com>
Co-Authored-By: Giordon Stark <kratsg@gmail.com>
6bd2d92 to
51871d6
Compare
optimistix requires Python >= 3.11, so it may never be imported and thus absent from sys.modules on older Python versions. Use .get() for the hide step and conditional restore for put-back to avoid KeyError. Co-Authored-By: Giordon Stark <kratsg@gmail.com>
|
@pfackeldey it looks like we're seeing significantly longer run times for some of the tests with optimistix. If you look at the |
|
@kratsg thanks for pushing this PR forward!! I didn't have the capacity last week to do so. I need to check, maybe a recompilation+retracing issue? I'll investigate... |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
The failures are due to the new |
|
Once it's rebased the PR is ready from my side @matthewfeickert @kratsg :) |
Description
This PR adds
optimistixas a new optimizer backend. Optimistix implements JAX-native solvers and supports differentiation through minimization via the implicit function theorem, moving pyhf a step closer to being fully differentiable out of the box.Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees:
Summary by CodeRabbit
emptyandarangearray-creation utilities to tensor backends.