summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2021-11-05 17:13:14 +0100
committerGitHub <noreply@github.com>2021-11-05 17:13:14 +0100
commitcec41d3817067a2eb3031092735347efe4184237 (patch)
treee5af7c2e72fd6f50590b2dd1c5f1f6f47dceebc3
parent0eac835c70cc1a13bb998f3b6cdb0515fafc05e1 (diff)
[MRG] Release 0.8 (#289)
* working on release * test circleci * try again * cleanup circle ci run * add all PR and releant Issues * update doc * thanks idris * update version + add pyproject.toml * test pyproject.toml * revert tests * build wheels * use windows-latest for tests * add tests python 3.10 * build all whels * all versions * build all wheels * build all wheels * cleanup pep8 and minimal acions * forst shot text release * bettr text * stuff * release text updated * update manifest to allow build from source * update doc again * update release
-rw-r--r--.github/workflows/build_tests.yml26
-rw-r--r--.github/workflows/build_wheels.yml13
-rw-r--r--.github/workflows/build_wheels_weekly.yml5
-rw-r--r--MANIFEST.in2
-rw-r--r--RELEASES.md192
-rw-r--r--docs/source/readme.rst28
-rw-r--r--docs/source/releases.rst134
-rw-r--r--examples/backends/plot_optim_gromov_pytorch.py2
-rw-r--r--ot/__init__.py8
-rw-r--r--ot/gpu/__init__.py10
-rw-r--r--ot/helpers/__init__.py3
11 files changed, 365 insertions, 58 deletions
diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml
index 91631b4..ee5a435 100644
--- a/.github/workflows/build_tests.yml
+++ b/.github/workflows/build_tests.yml
@@ -22,7 +22,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: [ 3.6, 3.7, 3.8, 3.9]
+ python-version: [ "3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
@@ -48,17 +48,12 @@ jobs:
pep8:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'no pep8')"
- strategy:
- max-parallel: 4
- matrix:
- python-version: [3.8]
-
steps:
- uses: actions/checkout@v1
- - name: Set up Python ${{ matrix.python-version }}
+ - name: Set up Python
uses: actions/setup-python@v1
with:
- python-version: ${{ matrix.python-version }}
+ python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@@ -74,17 +69,12 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'no ci')"
- strategy:
- max-parallel: 4
- matrix:
- python-version: [3.8]
-
steps:
- uses: actions/checkout@v1
- - name: Set up Python ${{ matrix.python-version }}
+ - name: Set up Python
uses: actions/setup-python@v1
with:
- python-version: ${{ matrix.python-version }}
+ python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@@ -103,7 +93,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: [3.7, 3.8, 3.9]
+ python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
@@ -125,12 +115,12 @@ jobs:
windows:
- runs-on: windows-2019
+ runs-on: windows-latest
if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
- python-version: [3.7, 3.8, 3.9]
+ python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml
index 53246ce..a935a5e 100644
--- a/.github/workflows/build_wheels.yml
+++ b/.github/workflows/build_wheels.yml
@@ -3,6 +3,7 @@ name: Build wheels
on:
workflow_dispatch:
release:
+ pull_request:
push:
branches:
- "*"
@@ -31,7 +32,7 @@ jobs:
- name: Install cibuildwheel
run: |
- python -m pip install cibuildwheel==1.10.0
+ python -m pip install cibuildwheel==2.2.2
- name: Build wheels
env:
@@ -69,12 +70,7 @@ jobs:
- name: Install cibuildwheel
run: |
- python -m pip install cibuildwheel==1.10.0
-
- - name: Install Visual C++ for Python 2.7
- if: startsWith(matrix.os, 'windows')
- run: |
- choco install vcpython27 -f -y
+ python -m pip install cibuildwheel==2.2.2
- name: Set up QEMU
if: runner.os == 'Linux'
@@ -84,9 +80,10 @@ jobs:
- name: Build wheels
env:
- CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp*" # remove pypy on mac and win (wrong version)
+ CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp* cp*musl*" # remove pypy on mac and win (wrong version)
CIBW_BEFORE_BUILD: "pip install numpy cython"
CIBW_ARCHS_LINUX: auto aarch64 # force aarch64 with QEMU
+ CIBW_ARCHS_MACOS: x86_64 universal2 arm64
run: |
python -m cibuildwheel --output-dir wheelhouse
diff --git a/.github/workflows/build_wheels_weekly.yml b/.github/workflows/build_wheels_weekly.yml
index 32b697f..2964844 100644
--- a/.github/workflows/build_wheels_weekly.yml
+++ b/.github/workflows/build_wheels_weekly.yml
@@ -31,7 +31,7 @@ jobs:
- name: Install cibuildwheel
run: |
- python -m pip install cibuildwheel==1.10.0
+ python -m pip install cibuildwheel==2.2.2
- name: Set up QEMU
if: runner.os == 'Linux'
@@ -41,9 +41,10 @@ jobs:
- name: Build wheels
env:
- CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp*" # remove pypy on mac and win (wrong version)
+ CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp* cp*musl*" # remove pypy on mac and win (wrong version)
CIBW_BEFORE_BUILD: "pip install numpy cython"
CIBW_ARCHS_LINUX: auto aarch64 # force aarch64 with QEMU
+ CIBW_ARCHS_MACOS: x86_64 universal2 arm64
run: |
python -m cibuildwheel --output-dir wheelhouse
diff --git a/MANIFEST.in b/MANIFEST.in
index df4e139..da67c77 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -6,4 +6,6 @@ include ot/lp/EMD.h
include ot/lp/EMD_wrapper.cpp
include ot/lp/emd_wrap.pyx
include ot/lp/full_bipartitegraph.h
+include ot/lp/full_bipartitegraph_omp.h
include ot/lp/network_simplex_simple.h
+include ot/lp/network_simplex_simple_omp.h
diff --git a/RELEASES.md b/RELEASES.md
index adb7fc1..6eb1502 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1,19 +1,167 @@
# Releases
-## 0.7.0
-*May 2020*
-This is the new stable release for POT. We made a lot of changes in the documentation and added several new features such as Partial OT, Unbalanced and Multi Sources OT Domain Adaptation and several bug fixes. One important change is that we have created the GitHub organization [PythonOT](https://github.com/PythonOT) that now owns the main POT repository [https://github.com/PythonOT/POT](https://github.com/PythonOT/POT) and the repository for the new documentation is now hosted at [https://PythonOT.github.io/](https://PythonOT.github.io/).
+## 0.8.0
+*November 2021*
+
+This new stable release introduces several important features.
+
+First we now have
+an OpenMP compatible exact ot solver in `ot.emd`. The OpenMP version is used
+when the parameter `numThreads` is greater than one and can lead to nice
+speedups on multi-core machines.
+
+Second we have introduced a backend mechanism that allows to use standard POT
+function seamlessly on Numpy, Pytorch and Jax arrays. Other backends are coming
+but right now POT can be used seamlessly for training neural networks in
+Pytorch. Notably we propose the first differentiable computation of the exact OT
+loss with `ot.emd2` (can be differentiated w.r.t. both cost matrix and sample
+weights), but also for the classical Sinkhorn loss with `ot.sinkhorn2`, the
+Wasserstein distance in 1D with `ot.wasserstein_1d`, sliced Wasserstein with
+`ot.sliced_wasserstein_distance` and Gromov-Wasserstein with `ot.gromov_wasserstein2`. Examples of how
+this new feature can be used are now available in the documentation where the
+Pytorch backend is used to estimate a [minimal Wasserstein
+estimator](https://PythonOT.github.io/auto_examples/backends/plot_unmix_optim_torch.html),
+a [Generative Network
+(GAN)](https://PythonOT.github.io/auto_examples/backends/plot_wass2_gan_torch.html),
+for a [sliced Wasserstein gradient
+flow](https://PythonOT.github.io/auto_examples/backends/plot_sliced_wass_grad_flow_pytorch.html)
+and [optimizing the Gromov-Wassersein distance](https://PythonOT.github.io/auto_examples/backends/plot_optim_gromov_pytorch.html). Note that the Jax backend is still in early development and quite
+slow at the moment, we strongly recommend for Jax users to use the [OTT
+toolbox](https://github.com/google-research/ott) when possible.
+ As a result of this new feature,
+ the old `ot.gpu` submodule is now deprecated since GPU
+implementations can be done using GPU arrays on the torch backends.
+
+Other novel features include implementation for [Sampled Gromov Wasserstein and
+Pointwise Gromov
+Wasserstein](https://PythonOT.github.io/auto_examples/gromov/plot_gromov.html#compute-gw-with-a-scalable-stochastic-method-with-any-loss-function),
+Sinkhorn in log space with `method='sinkhorn_log'`, [Projection Robust
+Wasserstein](https://PythonOT.github.io/gen_modules/ot.dr.html?highlight=robust#ot.dr.projection_robust_wasserstein),
+ans [deviased Sinkorn barycenters](https://PythonOT.github.ioauto_examples/barycenters/plot_debiased_barycenter.html).
+
+This release will also simplify the installation process. We have now a
+`pyproject.toml` that defines the build dependency and POT should now build even
+when cython is not installed yet. Also we now provide pe-compiled wheels for
+linux `aarch64` that is used on Raspberry PI and android phones and for MacOS on
+ARM processors.
+
+
+Finally POT was accepted for publication in the Journal of Machine Learning
+Research (JMLR) open source software track and we ask the POT users to cite [this
+paper](https://www.jmlr.org/papers/v22/20-451.html) from now on. The documentation has been improved in particular by adding a
+"Why OT?" section to the quick start guide and several new examples illustrating
+the new features. The documentation now has two version : the stable version
+[https://pythonot.github.io/](https://pythonot.github.io/)
+corresponding to the last release and the master version [https://pythonot.github.io/master](https://pythonot.github.io/master) that corresponds to the
+current master branch on GitHub.
+
+
+As usual, we want to thank all the POT contributors (now 37 people have
+contributed to the toolbox). But for this release we thank in particular Nathan
+Cassereau and Kamel Guerda from the AI support team at
+[IDRIS](http://www.idris.fr/) for their support to the development of the
+backend and OpenMP implementations.
+
+
+#### New features
+
+- OpenMP support for exact OT solvers (PR #260)
+- Backend for running POT in numpy/torch + exact solver (PR #249)
+- Backend implementation of most functions in `ot.bregman` (PR #280)
+- Backend implementation of most functions in `ot.optim` (PR #282)
+- Backend implementation of most functions in `ot.gromov` (PR #294, PR #302)
+- Test for arrays of different type and device (CPU/GPU) (PR #304, #303)
+- Implementation of Sinkhorn in log space with `method='sinkhorn_log'` (PR #290)
+- Implementation of regularization path for L2 Unbalanced OT (PR #274)
+- Implementation of Projection Robust Wasserstein (PR #267)
+- Implementation of Debiased Sinkhorn Barycenters (PR #291)
+- Implementation of Sampled Gromov Wasserstein and Pointwise Gromov Wasserstein
+ (PR #275)
+- Add `pyproject.toml` and build POT without installing cython first (PR #293)
+- Lazy implementation in log space for sinkhorn on samples (PR #259)
+- Documentation cleanup (PR #298)
+- Two up-to-date documentations [for stable
+ release](https://PythonOT.github.io/) and for [master branch](https://pythonot.github.io/master/).
+- Building wheels on ARM for Raspberry PI and smartphones (PR #238)
+- Update build wheels to new version and new pythons (PR #236, #253)
+- Implementation of sliced Wasserstein distance (Issue #202, PR #203)
+- Add minimal build to CI and perform pep8 test separately (PR #210)
+- Speedup of tests and return run time (PR #262)
+- Add "Why OT" discussion to the documentation (PR #220)
+- New introductory example to discrete OT in the documentation (PR #191)
+- Add templates for Issues/PR on Github (PR#181)
-This is the first release where the Python 2.7 tests have been removed. Most of the toolbox should still work but we do not offer support for Python 2.7 and will close related Issues.
+#### Closed issues
-A lot of changes have been done to the documentation that is now hosted on [https://PythonOT.github.io/](https://PythonOT.github.io/) instead of readthedocs. It was a hard choice but readthedocs did not allow us to run sphinx-gallery to update our beautiful examples and it was a huge amount of work to maintain. The documentation is now automatically compiled and updated on merge. We also removed the notebooks from the repository for space reason and also because they are all available in the [example gallery](https://pythonot.github.io/auto_examples/index.html). Note that now the output of the documentation build for each commit in the PR is available to check that the doc builds correctly before merging which was not possible with readthedocs.
+- Debug Memory leak in GAN example (#254)
+- DEbug GPU bug (Issue #284, #287, PR #288)
+- set_gradients method for JAX backend (PR #278)
+- Quicker GAN example for CircleCI build (PR #258)
+- Better formatting in Readme (PR #234)
+- Debug CI tests (PR #240, #241, #242)
+- Bug in Partial OT solver dummy points (PR #215)
+- Bug when Armijo linesearch (Issue #184, #198, #281, PR #189, #199, #286)
+- Bug Barycenter Sinkhorn (Issue 134, PR #195)
+- Infeasible solution in exact OT (Issues #126,#93, PR #217)
+- Doc for SUpport Barycenters (Issue #200, PR #201)
+- Fix labels transport in BaseTransport (Issue #207, PR #208)
+- Bug in `emd_1d`, non respected bounds (Issue #169, PR #170)
+- Removed Python 2.7 support and update codecov file (PR #178)
+- Add normalization for WDA and test it (PR #172, #296)
+- Cleanup code for new version of `flake8` (PR #176)
+- Fixed requirements in `setup.py` (PR #174)
+- Removed specific MacOS flags (PR #175)
-The CI framework has also been changed with a move from Travis to Github Action which allows to get faster tests on Windows, MacOS and Linux. We also now report our coverage on [Codecov.io](https://codecov.io/gh/PythonOT/POT) and we have a reasonable 92% coverage. We also now generate wheels for a number of OS and Python versions at each merge in the master branch. They are available as outputs of this [action](https://github.com/PythonOT/POT/actions?query=workflow%3A%22Build+dist+and+wheels%22). This will allow simpler multi-platform releases from now on.
-In terms of new features we now have [OTDA Classes for unbalanced OT](https://pythonot.github.io/gen_modules/ot.da.html#ot.da.UnbalancedSinkhornTransport), a new Domain adaptation class form [multi domain problems (JCPOT)](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_jcpot.html#sphx-glr-auto-examples-domain-adaptation-plot-otda-jcpot-py), and several solvers to solve the [Partial Optimal Transport](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_partial_wass_and_gromov.html#sphx-glr-auto-examples-unbalanced-partial-plot-partial-wass-and-gromov-py) problems.
+## 0.7.0
+*May 2020*
-This release is also the moment to thank all the POT contributors (old and new) for helping making POT such a nice toolbox. A lot of changes (also in the API) are comming for the next versions.
+This is the new stable release for POT. We made a lot of changes in the
+documentation and added several new features such as Partial OT, Unbalanced and
+Multi Sources OT Domain Adaptation and several bug fixes. One important change
+is that we have created the GitHub organization
+[PythonOT](https://github.com/PythonOT) that now owns the main POT repository
+[https://github.com/PythonOT/POT](https://github.com/PythonOT/POT) and the
+repository for the new documentation is now hosted at
+[https://PythonOT.github.io/](https://PythonOT.github.io/).
+
+This is the first release where the Python 2.7 tests have been removed. Most of
+the toolbox should still work but we do not offer support for Python 2.7 and
+will close related Issues.
+
+A lot of changes have been done to the documentation that is now hosted on
+[https://PythonOT.github.io/](https://PythonOT.github.io/) instead of
+readthedocs. It was a hard choice but readthedocs did not allow us to run
+sphinx-gallery to update our beautiful examples and it was a huge amount of work
+to maintain. The documentation is now automatically compiled and updated on
+merge. We also removed the notebooks from the repository for space reason and
+also because they are all available in the [example
+gallery](https://pythonot.github.io/auto_examples/index.html). Note that now the
+output of the documentation build for each commit in the PR is available to
+check that the doc builds correctly before merging which was not possible with
+readthedocs.
+
+The CI framework has also been changed with a move from Travis to Github Action
+which allows to get faster tests on Windows, MacOS and Linux. We also now report
+our coverage on [Codecov.io](https://codecov.io/gh/PythonOT/POT) and we have a
+reasonable 92% coverage. We also now generate wheels for a number of OS and
+Python versions at each merge in the master branch. They are available as
+outputs of this
+[action](https://github.com/PythonOT/POT/actions?query=workflow%3A%22Build+dist+and+wheels%22).
+This will allow simpler multi-platform releases from now on.
+
+In terms of new features we now have [OTDA Classes for unbalanced
+OT](https://pythonot.github.io/gen_modules/ot.da.html#ot.da.UnbalancedSinkhornTransport),
+a new Domain adaptation class form [multi domain problems
+(JCPOT)](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_jcpot.html#sphx-glr-auto-examples-domain-adaptation-plot-otda-jcpot-py),
+and several solvers to solve the [Partial Optimal
+Transport](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_partial_wass_and_gromov.html#sphx-glr-auto-examples-unbalanced-partial-plot-partial-wass-and-gromov-py)
+problems.
+
+This release is also the moment to thank all the POT contributors (old and new)
+for helping making POT such a nice toolbox. A lot of changes (also in the API)
+are coming for the next versions.
#### Features
@@ -31,6 +179,8 @@ This release is also the moment to thank all the POT contributors (old and new)
#### Closed issues
+- Add JMLR paper to teh readme ad Mathieu Blondel to the Acknoledgments (PR
+ #231, #232)
- Bug in Unbalanced OT example (Issue #127)
- Clean Cython output when calling setup.py clean (Issue #122)
- Various Macosx compilation problems (Issue #113, Issue #118, PR#130)
@@ -54,18 +204,24 @@ https://python3statement.org/ for more reasons). For next release we will keep
the travis tests for Python 2 but will make them non necessary for merge in 2020.
The features are never complete in a toolbox designed for solving mathematical
-problems and research but with the new contributions we now implement algorithms and solvers
-from 24 scientific papers (listed in the README.md file). New features include a
-direct implementation of the [empirical Sinkhorn divergence](https://pot.readthedocs.io/en/latest/all.html#ot.bregman.empirical_sinkhorn_divergence)
-, a new efficient (Cython implementation) solver for [EMD in 1D](https://pot.readthedocs.io/en/latest/all.html#ot.lp.emd_1d)
-and corresponding [Wasserstein
-1D](https://pot.readthedocs.io/en/latest/all.html#ot.lp.wasserstein_1d). We now also
-have implementations for [Unbalanced OT](https://github.com/rflamary/POT/blob/master/notebooks/plot_UOT_1D.ipynb)
-and a solver for [Unbalanced OT barycenters](https://github.com/rflamary/POT/blob/master/notebooks/plot_UOT_barycenter_1D.ipynb).
+problems and research but with the new contributions we now implement algorithms
+and solvers from 24 scientific papers (listed in the README.md file). New
+features include a direct implementation of the [empirical Sinkhorn
+divergence](https://pot.readthedocs.io/en/latest/all.html#ot.bregman.empirical_sinkhorn_divergence),
+a new efficient (Cython implementation) solver for [EMD in
+1D](https://pot.readthedocs.io/en/latest/all.html#ot.lp.emd_1d) and
+corresponding [Wasserstein
+1D](https://pot.readthedocs.io/en/latest/all.html#ot.lp.wasserstein_1d). We now
+also have implementations for [Unbalanced
+OT](https://github.com/rflamary/POT/blob/master/notebooks/plot_UOT_1D.ipynb) and
+a solver for [Unbalanced OT
+barycenters](https://github.com/rflamary/POT/blob/master/notebooks/plot_UOT_barycenter_1D.ipynb).
A new variant of Gromov-Wasserstein divergence called [Fused
Gromov-Wasserstein](https://pot.readthedocs.io/en/latest/all.html?highlight=fused_#ot.gromov.fused_gromov_wasserstein)
- has been also contributed with exemples of use on [structured data](https://github.com/rflamary/POT/blob/master/notebooks/plot_fgw.ipynb)
-and computing [barycenters of labeld graphs](https://github.com/rflamary/POT/blob/master/notebooks/plot_barycenter_fgw.ipynb).
+has been also contributed with exemples of use on [structured
+data](https://github.com/rflamary/POT/blob/master/notebooks/plot_fgw.ipynb) and
+computing [barycenters of labeld
+graphs](https://github.com/rflamary/POT/blob/master/notebooks/plot_barycenter_fgw.ipynb).
A lot of work has been done on the documentation with several new
diff --git a/docs/source/readme.rst b/docs/source/readme.rst
index ee32e2b..a8f1bc0 100644
--- a/docs/source/readme.rst
+++ b/docs/source/readme.rst
@@ -34,6 +34,9 @@ POT provides the following generic OT solvers (links to examples):
[21] and unmixing [4].
- Sinkhorn divergence [23] and entropic regularization OT from
empirical data.
+- Debiased Sinkhorn barycenters `Sinkhorn divergence
+ barycenter <auto_examples/barycenters/plot_debiased_barycenter.html>`__
+ [37]
- `Smooth optimal transport
solvers <auto_examples/plot_OT_1D_smooth.html>`__
(dual and semi-dual) for KL and squared L2 regularizations [17].
@@ -44,7 +47,8 @@ POT provides the following generic OT solvers (links to examples):
distances <auto_examples/gromov/plot_gromov.html>`__
and `GW
barycenters <auto_examples/gromov/plot_gromov_barycenter.html>`__
- (exact [13] and regularized [12])
+ (exact [13] and regularized [12]), differentiable using gradients
+ from
- `Fused-Gromov-Wasserstein distances
solver <auto_examples/gromov/plot_fgw.html#sphx-glr-auto-examples-plot-fgw-py>`__
and `FGW
@@ -70,7 +74,8 @@ POT provides the following generic OT solvers (links to examples):
(exact [29] and entropic [3] formulations).
- `Sliced
Wasserstein <auto_examples/sliced-wasserstein/plot_variance.html>`__
- [31, 32].
+ [31, 32] and Max-sliced Wasserstein [35] that can be used for
+ gradient flows [36].
- `Several
backends <https://pythonot.github.io/quickstart.html#solving-ot-with-multiple-backends>`__
for easy use of POT with
@@ -278,7 +283,8 @@ The contributors to this library are
Rakotomamonjy <https://sites.google.com/site/alainrakotomamonjy/home>`__
- `Vayer Titouan <https://tvayer.github.io/>`__ (Gromov-Wasserstein -,
Fused-Gromov-Wasserstein)
-- `Hicham Janati <https://hichamjanati.github.io/>`__ (Unbalanced OT)
+- `Hicham Janati <https://hichamjanati.github.io/>`__ (Unbalanced OT,
+ Debiased barycenters)
- `Romain Tavenard <https://rtavenar.github.io/>`__ (1d Wasserstein)
- `Mokhtar Z. Alaya <http://mzalaya.github.io/>`__ (Screenkhorn)
- `Ievgen Redko <https://ievred.github.io/>`__ (Laplacian DA, JCPOT)
@@ -501,6 +507,22 @@ gans <https://openaccess.thecvf.com/content_CVPR_2019/papers/Deshpande_Max-Slice
In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern
Recognition (pp. 10648-10656).
+[36] Liutkus, A., Simsekli, U., Majewski, S., Durmus, A., & Stöter, F.
+R. (2019, May). `Sliced-Wasserstein flows: Nonparametric generative
+modeling via optimal transport and
+diffusions <http://proceedings.mlr.press/v97/liutkus19a/liutkus19a.pdf>`__.
+In International Conference on Machine Learning (pp. 4104-4113). PMLR.
+
+[37] Janati, H., Cuturi, M., Gramfort, A. `Debiased sinkhorn
+barycenters <http://proceedings.mlr.press/v119/janati20a/janati20a.pdf>`__
+Proceedings of the 37th International Conference on Machine Learning,
+PMLR 119:4692-4701, 2020
+
+[38] C. Vincent-Cuaz, T. Vayer, R. Flamary, M. Corneli, N. Courty,
+`Online Graph Dictionary
+Learning <https://arxiv.org/pdf/2102.06555.pdf>`__, International
+Conference on Machine Learning (ICML), 2021.
+
.. |PyPI version| image:: https://badge.fury.io/py/POT.svg
:target: https://badge.fury.io/py/POT
.. |Anaconda Cloud| image:: https://anaconda.org/conda-forge/pot/badges/version.svg
diff --git a/docs/source/releases.rst b/docs/source/releases.rst
index 5a357f3..aa06105 100644
--- a/docs/source/releases.rst
+++ b/docs/source/releases.rst
@@ -1,6 +1,132 @@
Releases
========
+0.8.0
+-----
+
+*November 2021*
+
+This new stable release introduces several important features.
+
+First we now have an OpenMP compatible exact ot solver in ``ot.emd``.
+The OpenMP version is used when the parameter ``numThreads`` is greater
+than one and can lead to nice speedups on multi-core machines.
+
+| Second we have introduced a backend mechanism that allows to use
+ standard POT function seamlessly on Numpy, Pytorch and Jax arrays.
+ Other backends are coming but right now POT can be used seamlessly for
+ training neural networks in Pytorch. Notably we propose the first
+ differentiable computation of the exact OT loss with ``ot.emd2`` (can
+ be differentiated w.r.t. both cost matrix and sample weights), but
+ also for the classical Sinkhorn loss with ``ot.sinkhorn2``, the
+ Wasserstein distance in 1D with ``ot.wasserstein_1d``, sliced
+ Wasserstein with ``ot.sliced_wasserstein_distance`` and
+ Gromov-Wasserstein with ``ot.gromov_wasserstein2``. Examples of how
+ this new feature can be used are now available in the documentation
+ where the Pytorch backend is used to estimate a `minimal Wasserstein
+ estimator <https://PythonOT.github.io/auto_examples/backends/plot_unmix_optim_torch.html>`__,
+ a `Generative Network
+ (GAN) <https://PythonOT.github.io/auto_examples/backends/plot_wass2_gan_torch.html>`__,
+ for a `sliced Wasserstein gradient
+ flow <https://PythonOT.github.io/auto_examples/backends/plot_sliced_wass_grad_flow_pytorch.html>`__
+ and `optimizing the Gromov-Wassersein
+ distance <https://PythonOT.github.io/auto_examples/backends/plot_optim_gromov_pytorch.html>`__.
+ Note that the Jax backend is still in early development and quite slow
+ at the moment, we strongly recommend for Jax users to use the `OTT
+ toolbox <https://github.com/google-research/ott>`__ when possible.
+| As a result of this new feature, the old ``ot.gpu`` submodule is now
+ deprecated since GPU implementations can be done using GPU arrays on
+ the torch backends.
+
+Other novel features include implementation for `Sampled Gromov
+Wasserstein and Pointwise Gromov
+Wasserstein <https://PythonOT.github.io/auto_examples/gromov/plot_gromov.html#compute-gw-with-a-scalable-stochastic-method-with-any-loss-function>`__,
+Sinkhorn in log space with ``method='sinkhorn_log'``, `Projection Robust
+Wasserstein <https://PythonOT.github.io/gen_modules/ot.dr.html?highlight=robust#ot.dr.projection_robust_wasserstein>`__,
+ans `deviased Sinkorn
+barycenters <https://PythonOT.github.ioauto_examples/barycenters/plot_debiased_barycenter.html>`__.
+
+This release will also simplify the installation process. We have now a
+``pyproject.toml`` that defines the build dependency and POT should now
+build even when cython is not installed yet. Also we now provide
+pe-compiled wheels for linux ``aarch64`` that is used on Raspberry PI
+and android phones and for MacOS on ARM processors.
+
+Finally POT was accepted for publication in the Journal of Machine
+Learning Research (JMLR) open source software track and we ask the POT
+users to cite `this
+paper <https://www.jmlr.org/papers/v22/20-451.html>`__ from now on. The
+documentation has been improved in particular by adding a "Why OT?"
+section to the quick start guide and several new examples illustrating
+the new features. The documentation now has two version : the stable
+version https://pythonot.github.io/ corresponding to the last release
+and the master version https://pythonot.github.io/master that
+corresponds to the current master branch on GitHub.
+
+As usual, we want to thank all the POT contributors (now 37 people have
+contributed to the toolbox). But for this release we thank in particular
+Nathan Cassereau and Kamel Guerda from the AI support team at
+`IDRIS <http://www.idris.fr/>`__ for their support to the development of
+the backend and OpenMP implementations.
+
+New features
+^^^^^^^^^^^^
+
+- OpenMP support for exact OT solvers (PR #260)
+- Backend for running POT in numpy/torch + exact solver (PR #249)
+- Backend implementation of most functions in ``ot.bregman`` (PR #280)
+- Backend implementation of most functions in ``ot.optim`` (PR #282)
+- Backend implementation of most functions in ``ot.gromov`` (PR #294,
+ PR #302)
+- Test for arrays of different type and device (CPU/GPU) (PR #304,
+ #303)
+- Implementation of Sinkhorn in log space with
+ ``method='sinkhorn_log'`` (PR #290)
+- Implementation of regularization path for L2 Unbalanced OT (PR #274)
+- Implementation of Projection Robust Wasserstein (PR #267)
+- Implementation of Debiased Sinkhorn Barycenters (PR #291)
+- Implementation of Sampled Gromov Wasserstein and Pointwise Gromov
+ Wasserstein (PR #275)
+- Add ``pyproject.toml`` and build POT without installing cython first
+ (PR #293)
+- Lazy implementation in log space for sinkhorn on samples (PR #259)
+- Documentation cleanup (PR #298)
+- Two up-to-date documentations `for stable
+ release <https://PythonOT.github.io/>`__ and for `master
+ branch <https://pythonot.github.io/master/>`__.
+- Building wheels on ARM for Raspberry PI and smartphones (PR #238)
+- Update build wheels to new version and new pythons (PR #236, #253)
+- Implementation of sliced Wasserstein distance (Issue #202, PR #203)
+- Add minimal build to CI and perform pep8 test separately (PR #210)
+- Speedup of tests and return run time (PR #262)
+- Add "Why OT" discussion to the documentation (PR #220)
+- New introductory example to discrete OT in the documentation (PR
+ #191)
+- Add templates for Issues/PR on Github (PR#181)
+
+Closed issues
+^^^^^^^^^^^^^
+
+- Debug Memory leak in GAN example (#254)
+- DEbug GPU bug (Issue #284, #287, PR #288)
+- set\_gradients method for JAX backend (PR #278)
+- Quicker GAN example for CircleCI build (PR #258)
+- Better formatting in Readme (PR #234)
+- Debug CI tests (PR #240, #241, #242)
+- Bug in Partial OT solver dummy points (PR #215)
+- Bug when Armijo linesearch (Issue #184, #198, #281, PR #189, #199,
+ #286)
+- Bug Barycenter Sinkhorn (Issue 134, PR #195)
+- Infeasible solution in exact OT (Issues #126,#93, PR #217)
+- Doc for SUpport Barycenters (Issue #200, PR #201)
+- Fix labels transport in BaseTransport (Issue #207, PR #208)
+- Bug in ``emd_1d``, non respected bounds (Issue #169, PR #170)
+- Removed Python 2.7 support and update codecov file (PR #178)
+- Add normalization for WDA and test it (PR #172, #296)
+- Cleanup code for new version of ``flake8`` (PR #176)
+- Fixed requirements in ``setup.py`` (PR #174)
+- Removed specific MacOS flags (PR #175)
+
0.7.0
-----
@@ -50,7 +176,7 @@ problems.
This release is also the moment to thank all the POT contributors (old
and new) for helping making POT such a nice toolbox. A lot of changes
-(also in the API) are comming for the next versions.
+(also in the API) are coming for the next versions.
Features
^^^^^^^^
@@ -72,6 +198,8 @@ Features
Closed issues
^^^^^^^^^^^^^
+- Add JMLR paper to teh readme ad Mathieu Blondel to the Acknoledgments
+ (PR #231, #232)
- Bug in Unbalanced OT example (Issue #127)
- Clean Cython output when calling setup.py clean (Issue #122)
- Various Macosx compilation problems (Issue #113, Issue #118, PR#130)
@@ -103,8 +231,8 @@ mathematical problems and research but with the new contributions we now
implement algorithms and solvers from 24 scientific papers (listed in
the README.md file). New features include a direct implementation of the
`empirical Sinkhorn
-divergence <all.html#ot.bregman.empirical_sinkhorn_divergence>`__
-, a new efficient (Cython implementation) solver for `EMD in
+divergence <all.html#ot.bregman.empirical_sinkhorn_divergence>`__,
+a new efficient (Cython implementation) solver for `EMD in
1D <all.html#ot.lp.emd_1d>`__ and
corresponding `Wasserstein
1D <all.html#ot.lp.wasserstein_1d>`__.
diff --git a/examples/backends/plot_optim_gromov_pytorch.py b/examples/backends/plot_optim_gromov_pytorch.py
index 465f612..969707f 100644
--- a/examples/backends/plot_optim_gromov_pytorch.py
+++ b/examples/backends/plot_optim_gromov_pytorch.py
@@ -94,7 +94,7 @@ pl.axis("off")
# %%
-# Optimizing the weights of a simple template C0=eye(3) to fit Graph 1
+# Optimizing GW w.r.t. the weights on a template structure
# ------------------------------------------------
# The adajacency matrix C1 is block diagonal with 3 blocks. We want to
# optimize the weights of a simple template C0=eye(3) and see if we can
diff --git a/ot/__init__.py b/ot/__init__.py
index 4292b41..b6dc2b4 100644
--- a/ot/__init__.py
+++ b/ot/__init__.py
@@ -5,7 +5,8 @@
:py:mod:`ot.lp`, :py:mod:`ot.bregman`, :py:mod:`ot.optim`
:py:mod:`ot.utils`, :py:mod:`ot.datasets`,
:py:mod:`ot.gromov`, :py:mod:`ot.smooth`
- :py:mod:`ot.stochastic`
+ :py:mod:`ot.stochastic`, :py:mod:`ot.partial`, :py:mod:`ot.regpath`
+ , :py:mod:`ot.unbalanced`.
The following sub-modules are not imported due to additional dependencies:
@@ -49,7 +50,7 @@ from .gromov import (gromov_wasserstein, gromov_wasserstein2,
# utils functions
from .utils import dist, unif, tic, toc, toq
-__version__ = "0.8.0dev"
+__version__ = "0.8.0"
__all__ = ['emd', 'emd2', 'emd_1d', 'sinkhorn', 'sinkhorn2', 'utils',
'datasets', 'bregman', 'lp', 'tic', 'toc', 'toq', 'gromov',
@@ -57,5 +58,6 @@ __all__ = ['emd', 'emd2', 'emd_1d', 'sinkhorn', 'sinkhorn2', 'utils',
'dist', 'unif', 'barycenter', 'sinkhorn_lpl1_mm', 'da', 'optim',
'sinkhorn_unbalanced', 'barycenter_unbalanced',
'sinkhorn_unbalanced2', 'sliced_wasserstein_distance',
- 'max_sliced_wasserstein_distance',
+ 'gromov_wasserstein', 'gromov_wasserstein2', 'gromov_barycenters', 'fused_gromov_wasserstein', 'fused_gromov_wasserstein2',
+ 'max_sliced_wasserstein_distance',
'smooth', 'stochastic', 'unbalanced', 'partial', 'regpath']
diff --git a/ot/gpu/__init__.py b/ot/gpu/__init__.py
index e939610..12db605 100644
--- a/ot/gpu/__init__.py
+++ b/ot/gpu/__init__.py
@@ -7,7 +7,13 @@ The GPU backend in handled by `cupy
<https://cupy.chainer.org/>`_.
.. warning::
- Note that by default the module is not import in :mod:`ot`. In order to
+ This module is now deprecated and will be removed in future releases. POT
+ now privides a backend mechanism that allows for solving prolem on GPU wth
+ the pytorch backend.
+
+
+.. warning::
+ Note that by default the module is not imported in :mod:`ot`. In order to
use it you need to explicitely import :mod:`ot.gpu` .
By default, the functions in this module accept and return numpy arrays
@@ -36,7 +42,7 @@ from . import utils
from .utils import dist, to_gpu, to_np
-warnings.warn('This module will be deprecated in the next minor release of POT', category=DeprecationWarning)
+warnings.warn('This module is deprecated and will be removed in the next minor release of POT', category=DeprecationWarning)
__all__ = ["utils", "dist", "sinkhorn",
diff --git a/ot/helpers/__init__.py b/ot/helpers/__init__.py
new file mode 100644
index 0000000..b948671
--- /dev/null
+++ b/ot/helpers/__init__.py
@@ -0,0 +1,3 @@
+# Author: Remi Flamary <remi.flamary@unice.fr>
+#
+# License: MIT License