-
Notifications
You must be signed in to change notification settings - Fork 56
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
Respect prob.bounds in all solver wrappers #463
base: master
Are you sure you want to change the base?
Respect prob.bounds in all solver wrappers #463
Conversation
I also replaced print with logger.info in two places that stood out to me. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #463 +/- ##
==========================================
- Coverage 92.66% 92.64% -0.03%
==========================================
Files 78 78
Lines 14514 14529 +15
==========================================
+ Hits 13450 13460 +10
- Misses 1064 1069 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Replaced deprecated np.product with np.prod for numpy 2.0 support |
Looks good to me. I think the failing tests are unrelated to the changes in this PR. Let's see if we can fix those in master. Anyone have ideas how to resolve those? |
Thanks, it also seemed to me that way, tried looking into the issues with pyoculus myself but got sidetracked unfortunately. |
I just tried to merge simsopt master into this branch, to bring in the new fixes to the CI. However I think I didn't do this quite correctly and also merged in some extra commits from your master branch to this warn-unused-bounds branch. Sorry about that. |
I think to correct my mistaken merge, it would work to do
from the warn-unused-bounds branch, where d473a37 is the last intended commit before I merged. Let me know if you agree and if I should push this. Sorry again! |
dfb9f8e
to
32afc9d
Compare
4d2f816
to
d938aa2
Compare
Only the constrained_solve overloads respected the problem bounds, the least_squares_solve overloads ignored them, unless passed with
bounds=prob.bounds
explicitly. This is unintuitive, since these functions are specifically overloads forLeastSquaresProblem
, so I would expect it to use all the properties set on the object.I suggest harmonizing the usage of
constrained_solve
andleast_squares_solve
to in both cases respectprob.bounds
(as implemented in this PR), or at the very least raising a warning message to users, ifprob.bounds
were set, despite being ignored (I will adjust the PR if required).