Skip to content

Commit 2987765

Browse files
rflamarymatthewfeickertcedricvincentcuaz
authored
[MRG] Release 0.9.4 (#640)
* proper number + fisrts shit release file * Update RELEASES.md Co-authored-by: Matthew Feickert <[email protected]> * remove double sentence * remove jax constraints in setup.py * ad requiremet_all to manifest for a working source distibution * update setup.py with proiper optional install * small update reelase notes --------- Co-authored-by: Matthew Feickert <[email protected]> Co-authored-by: Cédric Vincent-Cuaz <[email protected]>
1 parent 5c9c70a commit 2987765

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include README.md
22
include RELEASES.md
33
include LICENSE
4+
include requirements_all.txt
45
include ot/lp/core.h
56
include ot/lp/EMD.h
67
include ot/lp/EMD_wrapper.cpp

RELEASES.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Releases
22

3-
## 0.9.4dev
3+
## 0.9.4
4+
*June 2024*
5+
6+
This new release contains several new features and bug fixes. Among the new features
7+
we have novel [Quantized FGW](https://pythonot.github.io/auto_examples/gromov/plot_quantized_gromov_wasserstein.html) solvers that can be used to speed up the computation of the FGW loss on large datasets or to promote a structure on the pairwise matrices. We also updated the continuous entropic mapping to provide efficient out-of-sample continuous mapping thanks to entropic regularization. We also have a new general unbalanced solvers for `ot.solve` and BFGS solver and illustrative example. Finally we have a new solver for the [Low Rank Gromov-Wasserstein](https://pythonot.github.io/auto_examples/others/plot_lowrank_GW.html) that can be used to compute the GW distance between two large scale datasets with a low rank approximation.
8+
9+
From a maintenance point of view, we now have a new option to install optional dependencies with `pip install POT[all]` and the specific backends or submodules' dependencies may also be installed individually. The pip options are: `backend-jax, backend-tf, backend-torch, cvxopt, dr, gnn, plot, all`. We also provide with this release support for NumPy 2.0 (the wheels should now be compatible with NumPy 2.0 and below). We also fixed several issues such as gradient sign errors for FGW solvers, empty weights for `ot.emd2`, and line-search in partial GW. We also split the `test/test_gromov.py` into `test/gromov/` to make the tests more manageable.
410

511
#### New features
612
+ NumPy 2.0 support is added (PR #629)

ot/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
# utils functions
6060
from .utils import dist, unif, tic, toc, toq
6161

62-
__version__ = "0.9.4dev"
62+
__version__ = "0.9.4"
6363

6464
__all__ = ['emd', 'emd2', 'emd_1d', 'sinkhorn', 'sinkhorn2', 'utils',
6565
'datasets', 'bregman', 'lp', 'tic', 'toc', 'toq', 'gromov',

ot/gromov/_lowrank.py

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def _flat_product_operator(X, nx=None):
6161
def lowrank_gromov_wasserstein_samples(X_s, X_t, a=None, b=None, reg=0, rank=None, alpha=1e-10, gamma_init="rescale",
6262
rescale_cost=True, cost_factorized_Xs=None, cost_factorized_Xt=None, stopThr=1e-4, numItermax=1000,
6363
stopThr_dykstra=1e-3, numItermax_dykstra=10000, seed_init=49, warn=True, warn_dykstra=False, log=False):
64-
6564
r"""
6665
Solve the entropic regularization Gromov-Wasserstein transport problem under low-nonnegative rank constraints
6766
on the couplings and cost matrices.

setup.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env python
22

3+
# Author: Remi Flamary <[email protected]>
4+
#
5+
# License: MIT License
36

47
import os
58
import re
@@ -46,8 +49,6 @@
4649
sdk_path = subprocess.check_output(['xcrun', '--show-sdk-path'])
4750
os.environ['CFLAGS'] = '-isysroot "{}"'.format(sdk_path.rstrip().decode("utf-8"))
4851

49-
with open('requirements_all.txt') as f:
50-
optional_requirements = f.read().splitlines()
5152

5253
setup(
5354
name='POT',
@@ -74,15 +75,16 @@
7475
data_files=[],
7576
install_requires=["numpy>=1.16", "scipy>=1.6"],
7677
extras_require={
77-
'backend-numpy': [], # in requirements.
78-
'backend-jax': ['jax<=0.4.24', 'jaxlib<=0.4.24'],
79-
'backend-cupy': [], # should be installed with conda, not pip, or figure out what CUDA version above.
78+
'backend-numpy': [], # in requirements.
79+
'backend-jax': ['jax', 'jaxlib'],
80+
'backend-cupy': [], # should be installed with conda, not pip
8081
'backend-tf': ['tensorflow'],
8182
'backend-torch': ['torch'],
82-
'cvxopt': ['cvxopt'], # on it's own to prevent accidental GPL violations
83+
'cvxopt': ['cvxopt'], # on it's own to prevent accidental GPL violations
8384
'dr': ['scikit-learn', 'pymanopt', 'autograd'],
8485
'gnn': ['torch', 'torch_geometric'],
85-
'all': optional_requirements
86+
'plot': ['matplotlib'],
87+
'all': ['jax', 'jaxlib', 'tensorflow', 'torch', 'cvxopt', 'scikit-learn', 'pymanopt', 'autograd', 'torch_geometric', 'matplotlib']
8688
},
8789
python_requires=">=3.7",
8890
classifiers=[

0 commit comments

Comments
 (0)