-
Notifications
You must be signed in to change notification settings - Fork 82
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
Remove functional API #222
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #222 +/- ##
==========================================
- Coverage 89.21% 80.46% -8.76%
==========================================
Files 52 52
Lines 5315 5299 -16
Branches 549 542 -7
==========================================
- Hits 4742 4264 -478
- Misses 438 886 +448
- Partials 135 149 +14
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot Michal, this is indeed cleaner now.
tests/helpers/test_utils.py
Outdated
from ott.solvers.linear import sinkhorn | ||
|
||
|
||
def run_sinkhorn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feels copy pasted from sinkhorn_divergence.
is there a place this could be stored that's more visible? or maybe stored in sinkhorn.py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added as sinkhorn.solve
+ this function now also supports rank
, to make it consistent with gromov_wasserstein.solve
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this massive refactoring, this all looks a lot cleaner! LGTM.
* Remove `sinkhorn function` * Fix `sinkhorn_divergence` test * Remove `gromov_wasserstein` function * Remove `make` functions * Fix `soft_sort` and Jacobian tests * Remove `Transport` interface * Fix Jacobian test * Fix `soft_sort` and tests * Clean up some tests * Fix wrong `value_and_grad` usage * Update notebooks, isort and pre-commit * [ci skip] Fix rendering in `Sinkhorn` * Handle TODOs, clean initializer tests * Add `sinkhorn.solve` utility * Re-add `gromov_wasserstein.solve`, polish docs * Remove redundant line from `pyproject.toml` * Polish quad docs * Add rank to `sinkhorn.solve` * Add `rank` to `sinkhorn.solve`
In this PR:
make
functionsott.tools.transport
interface (was used sparsely); should be re-introduced in the future when creating abstraction for solver outputssinkhorn.sinkhorn -> sinkhorn.solve
gromov_wasserstein.gromov_wasserstein -> gromov_wasserstein.solve
isort
(also enabled for notebooks)TODOs: