-
Notifications
You must be signed in to change notification settings - Fork 517
[MRG] Fix None init plan in unbalanced lbfgs solvers #731
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
base: master
Are you sure you want to change the base?
[MRG] Fix None init plan in unbalanced lbfgs solvers #731
Conversation
ot/unbalanced/_lbfgs.py
Outdated
G0 = a[:, None] * b[None, :] if G0 is None else nx.to_numpy(G0) | ||
c = a[:, None] * b[None, :] if c is None else nx.to_numpy(c) | ||
|
||
# wrap the callable function to handle numpy arrays |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we create a function in utils that provide a check/wrapper around functions for numpy conversion? hat seems like something we might need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done via ot.utils.fun_to_numpy
. Could you please double check the implementation ?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #731 +/- ##
=======================================
Coverage 97.09% 97.10%
=======================================
Files 100 100
Lines 20432 20453 +21
=======================================
+ Hits 19839 19861 +22
+ Misses 593 592 -1 🚀 New features to boost your workflow:
|
Types of changes
fix undesirable behaviour of
ot.unbalanced.lbfgsb_unbalanced
whenisinstance(reg_div, tuple)
to test whether included functions in reg_div can handle numpy arrays. These tests are now handled viaot.utils.fun_to_numpy
.Motivation and context / Related issue
How has this been tested (if it applies)
PR checklist