Skip to content

Validate loss_fun parameter in Gromov-Wasserstein utils #513

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

Merged
merged 3 commits into from
Aug 26, 2023

Conversation

kachayev
Copy link
Collaborator

Types of changes

ot.gromov._utils.init_matrix raises ValueError when unknown loss_fun is given.
ot.gromov._utils.init_matrix_semirelaxed raises NotImplementedError for loss_fun='kl_loss'.
ot.gromov._utils.init_matrix_semirelaxed raises ValueError for unknown loss_fun.

Motivation and context / Related issue

Error message is rather hard to understand when unsupported loss_fun is used (as the code makes an attempt to call undefined function).

How has this been tested (if it applies)

New test cases are provided.

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.

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #513 (3f87316) into master (20cc202) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #513   +/-   ##
=======================================
  Coverage   96.05%   96.06%           
=======================================
  Files          65       65           
  Lines       13679    13706   +27     
=======================================
+ Hits        13140    13167   +27     
  Misses        539      539           

@agramfort agramfort merged commit 7fa8438 into PythonOT:master Aug 26, 2023
@agramfort
Copy link
Collaborator

thx @kachayev

@kachayev kachayev deleted the fix-gromov-utils-param-validation branch August 26, 2023 14:17
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.

2 participants