Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricvincentcuaz committed Jan 20, 2025
2 parents c3264c1 + 9d00f96 commit 2e55e04
Show file tree
Hide file tree
Showing 13 changed files with 1,074 additions and 1,030 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The contributors to this library are:
* [Camille Le Coz](https://www.linkedin.com/in/camille-le-coz-8593b91a1/) (EMD2 debug)
* [Eduardo Fernandes Montesuma](https://eddardd.github.io/my-personal-blog/) (Free support sinkhorn barycenter)
* [Theo Gnassounou](https://github.com/tgnassou) (OT between Gaussian distributions)
* [Clément Bonet](https://clbonet.github.io) (Wassertstein on circle, Spherical Sliced-Wasserstein)
* [Clément Bonet](https://clbonet.github.io) (Wasserstein on circle, Spherical Sliced-Wasserstein)
* [Ronak Mehta](https://ronakrm.github.io) (Efficient Discrete Multi Marginal Optimal Transport Regularization)
* [Xizheng Yu](https://github.com/x12hengyu) (Efficient Discrete Multi Marginal Optimal Transport Regularization)
* [Sonia Mazelet](https://github.com/SoniaMaz8) (Template based GNN layers)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ POT provides the following generic OT solvers (links to examples):
* [Efficient Discrete Multi Marginal Optimal Transport Regularization](https://pythonot.github.io/auto_examples/others/plot_demd_gradient_minimize.html) [50].
* [Several backends](https://pythonot.github.io/quickstart.html#solving-ot-with-multiple-backends) for easy use of POT with [Pytorch](https://pytorch.org/)/[jax](https://github.com/google/jax)/[Numpy](https://numpy.org/)/[Cupy](https://cupy.dev/)/[Tensorflow](https://www.tensorflow.org/) arrays.
* [Smooth Strongly Convex Nearest Brenier Potentials](https://pythonot.github.io/auto_examples/others/plot_SSNB.html#sphx-glr-auto-examples-others-plot-ssnb-py) [58], with an extension to bounding potentials using [59].
* Gaussian Mixture Model OT [69]
* [Gaussian Mixture Model OT](https://pythonot.github.io/auto_examples/others/plot_GMMOT_plan.html#sphx-glr-auto-examples-others-plot-gmmot-plan-py) [69].
* [Co-Optimal Transport](https://pythonot.github.io/auto_examples/others/plot_COOT.html) [49] and
[unbalanced Co-Optimal Transport](https://pythonot.github.io/auto_examples/others/plot_learning_weights_with_COOT.html) [71].
* Fused unbalanced Gromov-Wasserstein [70].
Expand Down
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Implement CG solvers for partial FGW (PR #687)
- Added feature `grad=last_step` for `ot.solvers.solve` (PR #693)
- Automatic PR labeling and release file update check (PR #704)
- Reorganize sub-module `ot/lp/__init__.py` into separate files (PR #714)
- Implement projected gradient descent solvers for entropic partial FGW (PR #702)

#### Closed issues
Expand Down
2 changes: 1 addition & 1 deletion ot/gmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .backend import get_backend
from .lp import emd2, emd
import numpy as np
from .lp import dist
from .utils import dist
from .gaussian import bures_wasserstein_mapping


Expand Down
6 changes: 3 additions & 3 deletions ot/gromov/_partial.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def partial_gromov_wasserstein(
if m is None:
m = min(np.sum(p), np.sum(q))
elif m < 0:
raise ValueError("Problem infeasible. Parameter m should be greater" " than 0.")
raise ValueError("Problem infeasible. Parameter m should be greater than 0.")
elif m > min(np.sum(p), np.sum(q)):
raise ValueError(
"Problem infeasible. Parameter m should lower or"
Expand Down Expand Up @@ -654,7 +654,7 @@ def partial_fused_gromov_wasserstein(
if m is None:
m = min(np.sum(p), np.sum(q))
elif m < 0:
raise ValueError("Problem infeasible. Parameter m should be greater" " than 0.")
raise ValueError("Problem infeasible. Parameter m should be greater than 0.")
elif m > min(np.sum(p), np.sum(q)):
raise ValueError(
"Problem infeasible. Parameter m should lower or"
Expand Down Expand Up @@ -1213,7 +1213,7 @@ def entropic_partial_gromov_wasserstein(
if m is None:
m = min(nx.sum(p), nx.sum(q))
elif m < 0:
raise ValueError("Problem infeasible. Parameter m should be greater" " than 0.")
raise ValueError("Problem infeasible. Parameter m should be greater than 0.")
elif m > min(nx.sum(p), nx.sum(q)):
raise ValueError(
"Problem infeasible. Parameter m should lower or"
Expand Down
6 changes: 3 additions & 3 deletions ot/gromov/_quantized.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def get_graph_partition(
raise ValueError(
f"""
Unknown `part_method='{part_method}'`. Use one of:
{'random', 'louvain', 'fluid', 'spectral', 'GW', 'FGW'}.
{"random", "louvain", "fluid", "spectral", "GW", "FGW"}.
"""
)
return nx.from_numpy(part, type_as=C0)
Expand Down Expand Up @@ -447,7 +447,7 @@ def get_graph_representants(C, part, rep_method="pagerank", random_state=0, nx=N
raise ValueError(
f"""
Unknown `rep_method='{rep_method}'`. Use one of:
{'random', 'pagerank'}.
{"random", "pagerank"}.
"""
)

Expand Down Expand Up @@ -953,7 +953,7 @@ def get_partition_and_representants_samples(
else:
raise ValueError(
f"""
Unknown `method='{method}'`. Use one of: {'random', 'kmeans'}
Unknown `method='{method}'`. Use one of: {"random", "kmeans"}
"""
)

Expand Down
Loading

0 comments on commit 2e55e04

Please sign in to comment.