diff --git a/MANIFEST.in b/MANIFEST.in index da67c77fe..da2820cdc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ include README.md include RELEASES.md include LICENSE +include requirements_all.txt include ot/lp/core.h include ot/lp/EMD.h include ot/lp/EMD_wrapper.cpp diff --git a/RELEASES.md b/RELEASES.md index 294614114..56de9a179 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,6 +1,12 @@ # Releases -## 0.9.4dev +## 0.9.4 +*June 2024* + +This new release contains several new features and bug fixes. Among the new features +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. + +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. #### New features + NumPy 2.0 support is added (PR #629) diff --git a/ot/__init__.py b/ot/__init__.py index d8ac5ac28..5eb3977aa 100644 --- a/ot/__init__.py +++ b/ot/__init__.py @@ -59,7 +59,7 @@ # utils functions from .utils import dist, unif, tic, toc, toq -__version__ = "0.9.4dev" +__version__ = "0.9.4" __all__ = ['emd', 'emd2', 'emd_1d', 'sinkhorn', 'sinkhorn2', 'utils', 'datasets', 'bregman', 'lp', 'tic', 'toc', 'toq', 'gromov', diff --git a/ot/gromov/_lowrank.py b/ot/gromov/_lowrank.py index 5bab15edc..9aa3faab5 100644 --- a/ot/gromov/_lowrank.py +++ b/ot/gromov/_lowrank.py @@ -61,7 +61,6 @@ def _flat_product_operator(X, nx=None): def lowrank_gromov_wasserstein_samples(X_s, X_t, a=None, b=None, reg=0, rank=None, alpha=1e-10, gamma_init="rescale", rescale_cost=True, cost_factorized_Xs=None, cost_factorized_Xt=None, stopThr=1e-4, numItermax=1000, stopThr_dykstra=1e-3, numItermax_dykstra=10000, seed_init=49, warn=True, warn_dykstra=False, log=False): - r""" Solve the entropic regularization Gromov-Wasserstein transport problem under low-nonnegative rank constraints on the couplings and cost matrices. diff --git a/setup.py b/setup.py index dea4da670..c0f75ad0f 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,8 @@ #!/usr/bin/env python +# Author: Remi Flamary +# +# License: MIT License import os import re @@ -46,8 +49,6 @@ sdk_path = subprocess.check_output(['xcrun', '--show-sdk-path']) os.environ['CFLAGS'] = '-isysroot "{}"'.format(sdk_path.rstrip().decode("utf-8")) -with open('requirements_all.txt') as f: - optional_requirements = f.read().splitlines() setup( name='POT', @@ -74,15 +75,16 @@ data_files=[], install_requires=["numpy>=1.16", "scipy>=1.6"], extras_require={ - 'backend-numpy': [], # in requirements. - 'backend-jax': ['jax<=0.4.24', 'jaxlib<=0.4.24'], - 'backend-cupy': [], # should be installed with conda, not pip, or figure out what CUDA version above. + 'backend-numpy': [], # in requirements. + 'backend-jax': ['jax', 'jaxlib'], + 'backend-cupy': [], # should be installed with conda, not pip 'backend-tf': ['tensorflow'], 'backend-torch': ['torch'], - 'cvxopt': ['cvxopt'], # on it's own to prevent accidental GPL violations + 'cvxopt': ['cvxopt'], # on it's own to prevent accidental GPL violations 'dr': ['scikit-learn', 'pymanopt', 'autograd'], 'gnn': ['torch', 'torch_geometric'], - 'all': optional_requirements + 'plot': ['matplotlib'], + 'all': ['jax', 'jaxlib', 'tensorflow', 'torch', 'cvxopt', 'scikit-learn', 'pymanopt', 'autograd', 'torch_geometric', 'matplotlib'] }, python_requires=">=3.7", classifiers=[