Skip to content

[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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

cedricvincentcuaz
Copy link
Collaborator

@cedricvincentcuaz cedricvincentcuaz commented Apr 25, 2025

Types of changes

fix undesirable behaviour of ot.unbalanced.lbfgsb_unbalanced when isinstance(reg_div, tuple) to test whether included functions in reg_div can handle numpy arrays. These tests are now handled via ot.utils.fun_to_numpy.

Motivation and context / Related issue

How has this been tested (if it applies)

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • I have added the PR and Issue fix to the RELEASES.md file.

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 ?

Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.10%. Comparing base (61e9af4) to head (9c314ec).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cedricvincentcuaz cedricvincentcuaz changed the title [WIP] Fix None init plan in unbalanced lbfgs solvers [MRG] Fix None init plan in unbalanced lbfgs solvers Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants