Skip to content

Commit

Permalink
[MRG] Release 0.9.4 (#640)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jun 26, 2024
1 parent 5c9c70a commit 2987765
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 7 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion ot/gromov/_lowrank.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 9 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python

# Author: Remi Flamary <[email protected]>
#
# License: MIT License

import os
import re
Expand Down Expand Up @@ -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',
Expand All @@ -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=[
Expand Down

0 comments on commit 2987765

Please sign in to comment.