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

[Fix] Gradient scaling in Partial GW solver #602

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

Conversation

yikun-baio
Copy link

@yikun-baio yikun-baio commented Feb 1, 2024

Types of changes

I modify the code ot.partial.partial_gromov_wasserstein

Motivation and context / Related issue

There seems to be an inconsistency between ot.partial.partial_gromov_wasserstein and the line search section in the paper [29]. I fixed this section. In addition, I have made minor change to the initial guess in the partial-GW solver since the original initial guess is np.out(p,q), which might not be suitable for unbalanced case, i.e. |p|\neq |q|.

N/A

N/A

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.

@rflamary rflamary changed the title new file: ot/partial_gw.py [Fix] Gradien saling in Partial GW solver Feb 1, 2024
@rflamary
Copy link
Collaborator

rflamary commented Feb 1, 2024

Hello @yikun-baio and thanks for the PR.

You should not propose anew file but instead implement directly your fix in th existing files. This is important because we have many tests that checks that nothing else breaks and we can compare easily your modification with the old implementation. We will do a code review with @lchapel when this is done.

@rflamary rflamary changed the title [Fix] Gradien saling in Partial GW solver [Fix] Gradien scaling in Partial GW solver Feb 12, 2024
@rflamary rflamary changed the title [Fix] Gradien scaling in Partial GW solver [Fix] Gradient scaling in Partial GW solver Feb 12, 2024
@rflamary rflamary changed the title [Fix] Gradient scaling in Partial GW solver [Fix] Gradient saling in Partial GW solver Feb 12, 2024
@yikun-baio
Copy link
Author

Hello @rflamary,

Thank you for your feedback. I apologize for not implementing the fix directly in the existing file and instead proposing a new file. This is my first time to contribute to a public project via a pull request.

I just realized that my email settings were inadvertently blocking emails from GitHub, which caused me to delay seeing your message.

Not sure if it's still needed, but I'll implement the fix as suggested and make sure it's done in an existing file for @lchapel's direct code review. Thank you very much for your guidance and I look forward to contributing more effectively in the future.

Thank you for your understanding and patience.

Sincerest regards,
Yikun

@rflamary rflamary changed the title [Fix] Gradient saling in Partial GW solver [Fix] Gradient scaling in Partial GW solver Mar 4, 2024
@rflamary
Copy link
Collaborator

Hello @yikun-baio this is a friendly reminder to implement your fix directly in the code if possible. I used a rocket emoji in your previous question to say that we are interested but maybe you did not receive a notfication.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Merging #602 (a1ba2d6) into master (ab12dd6) will decrease coverage by 0.07%.
The diff coverage is 82.08%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #602      +/-   ##
==========================================
- Coverage   96.79%   96.73%   -0.07%     
==========================================
  Files          77       78       +1     
  Lines       16086    16153      +67     
==========================================
+ Hits        15570    15625      +55     
- Misses        516      528      +12     

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.

None yet

2 participants