Skip to content
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

[MRG] Refactor: improve readibility in the convolutional module #709

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

Conversation

framunoz
Copy link
Contributor

@framunoz framunoz commented Dec 27, 2024

Types of changes

Refactor the ot.bregman._convolutional.py module to improve the readability of the module. These includes:

  • Add a function that returns convol_img function.
  • Leave the warning message as a constant in the top of the module.
  • Create a function for the verbose report.

Motivation and context / Related issue

There is a lot of duplicate code in this module, which can be encapsulated in functions to make it more modular.

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.

@framunoz
Copy link
Contributor Author

Why do the _convolutional_barycenter2d_log and _convolutional_barycenter2d_debiased_log functions still throw an error if the jax and tensorflow backends are used? I was checking the functions implemented in these modules, and they are implemented.

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.08%. Comparing base (39cd6ec) to head (dadb470).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #709      +/-   ##
==========================================
+ Coverage   97.06%   97.08%   +0.01%     
==========================================
  Files          98       98              
  Lines       19955    19937      -18     
==========================================
- Hits        19370    19355      -15     
+ Misses        585      582       -3     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant