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] Domain adaptation and unbalanced solvers with backend support #343

Merged
merged 49 commits into from
Mar 24, 2022

Conversation

ncassereau
Copy link
Contributor

@ncassereau ncassereau commented Feb 2, 2022

Types of changes

Introducing backend support for da.py

  • Backend version of da.py
  • Backend version of unbalanced.py (required by an Unbalanced transport class in da.py)
  • Backend tests for unbalanced.py
  • Backend tests for da.py
  • Add a warning for integers cast (Resolves POT generating incorrect result for very simple OT problem #345)
  • Solve scipy warning (about scalar search armijo location)

Motivation and context / Related issue

GPU support and Pytorch and automatic differentation, ...
Note that it does not support jax and tensorflow yet because those two backends do not allow item assignment.

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.

@codecov
Copy link

codecov bot commented Feb 2, 2022

Codecov Report

Merging #343 (7039a39) into master (9b9d222) will increase coverage by 0.08%.
The diff coverage is 96.36%.

@@            Coverage Diff             @@
##           master     #343      +/-   ##
==========================================
+ Coverage   93.63%   93.72%   +0.08%     
==========================================
  Files          22       22              
  Lines        5595     5753     +158     
==========================================
+ Hits         5239     5392     +153     
- Misses        356      361       +5     

@rflamary rflamary changed the title Domain adaptation with backend support [WIP] Domain adaptation with backend support Feb 4, 2022
@rflamary rflamary changed the title [WIP] Domain adaptation with backend support [WIP] Domain adaptation and unbalanced solvers with backend support Feb 9, 2022
@ncassereau ncassereau changed the title [WIP] Domain adaptation and unbalanced solvers with backend support [MRG] Domain adaptation and unbalanced solvers with backend support Feb 9, 2022
@ncassereau ncassereau marked this pull request as ready for review February 9, 2022 11:31
Copy link
Collaborator

@rflamary rflamary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an impressive PR good work @ncassereau-idris

I'm still a bit hesitant about the type output that ot.emd should return but in the meantime here are a few comments

ot/backend.py Outdated Show resolved Hide resolved
ot/backend.py Show resolved Hide resolved
ot/backend.py Show resolved Hide resolved
ot/backend.py Show resolved Hide resolved
ot/backend.py Show resolved Hide resolved
ot/utils.py Show resolved Hide resolved
test/test_da.py Outdated Show resolved Hide resolved
ot/unbalanced.py Show resolved Hide resolved
ot/da.py Outdated Show resolved Hide resolved
ot/da.py Outdated Show resolved Hide resolved
@rflamary rflamary merged commit 7671715 into PythonOT:master Mar 24, 2022
@ncassereau ncassereau deleted the domain_adaptation_backend branch March 24, 2022 09:56
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.

POT generating incorrect result for very simple OT problem
2 participants