Skip to content

[MRG] Add release version information to each example in the examples gallery #743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Backend implementation of `ot.dist` for (PR #701)
- Updated documentation Quickstart guide and User guide with new API (PR #726)
- Fix jax version for auto-grad (PR #732)
- Added to each example in the examples gallery the information about the release version in which it was introduced (PR #743)

#### Closed issues
- Fixed `ot.mapping` solvers which depended on deprecated `cvxpy` `ECOS` solver (PR #692, Issue #668)
Expand Down
3 changes: 3 additions & 0 deletions examples/backends/plot_Sinkhorn_gradients.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
This example illustrates the differences in terms of computation time between the gradient options for the Sinkhorn solver.
.. note::
Example added in release: 0.9.6
"""

# Author: Sonia Mazelet <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions examples/backends/plot_dual_ot_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Dual OT solvers for entropic and quadratic regularized OT with Pytorch
======================================================================
.. note::
Example added in release: 0.8.2.
"""

Expand Down
3 changes: 3 additions & 0 deletions examples/backends/plot_optim_gromov_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Optimizing the Gromov-Wasserstein distance with PyTorch
=======================================================

.. note::
Example added in release: 0.8.0.

In this example, we use the pytorch backend to optimize the Gromov-Wasserstein
(GW) loss between two graphs expressed as empirical distribution.

Expand Down
3 changes: 3 additions & 0 deletions examples/backends/plot_sliced_wass_grad_flow_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Sliced Wasserstein barycenter and gradient flow with PyTorch
============================================================

.. note::
Example added in release: 0.8.0.

In this example we use the pytorch backend to optimize the sliced Wasserstein
loss between two empirical distributions [31].

Expand Down
2 changes: 2 additions & 0 deletions examples/backends/plot_stoch_continuous_ot_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Continuous OT plan estimation with Pytorch
======================================================================

.. note::
Example added in release: 0.8.2.

"""

Expand Down
3 changes: 3 additions & 0 deletions examples/backends/plot_unmix_optim_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Wasserstein unmixing with PyTorch
=================================

.. note::
Example added in release: 0.8.0.

In this example we estimate mixing parameters from distributions that minimize
the Wasserstein distance. In other words we suppose that a target
distribution :math:`\mu^t` can be expressed as a weighted sum of source
Expand Down
3 changes: 3 additions & 0 deletions examples/backends/plot_wass2_gan_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Wasserstein 2 Minibatch GAN with PyTorch
========================================

.. note::
Example added in release: 0.8.0.

In this example we train a Wasserstein GAN using Wasserstein 2 on minibatches
as a distribution fitting term.

Expand Down
3 changes: 3 additions & 0 deletions examples/barycenters/plot_debiased_barycenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Debiased Sinkhorn barycenter demo
=================================

.. note::
Example added in release: 0.8.0.

This example illustrates the computation of the debiased Sinkhorn barycenter
as proposed in [37]_.

Expand Down
3 changes: 3 additions & 0 deletions examples/barycenters/plot_free_support_sinkhorn_barycenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
2D free support Sinkhorn barycenters of distributions
========================================================

.. note::
Example added in release: 0.9.1.

Illustration of Sinkhorn barycenter calculation between empirical distributions understood as point clouds

"""
Expand Down
3 changes: 3 additions & 0 deletions examples/barycenters/plot_gaussian_barycenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Gaussian Bures-Wasserstein barycenters
========================================================

.. note::
Example added in release: 0.9.2.

Illustration of Gaussian Bures-Wasserstein barycenters.

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Generalized Wasserstein Barycenter Demo
=======================================

.. note::
Example added in release: 0.9.1.

This example illustrates the computation of Generalized Wasserstein Barycenter
as proposed in [42].

Expand Down
3 changes: 3 additions & 0 deletions examples/domain-adaptation/plot_otda_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
OT for domain adaptation
========================

.. note::
Example added in release: 0.1.9.

This example introduces a domain adaptation in a 2D setting and the 4 OTDA
approaches currently supported in POT.

Expand Down
3 changes: 3 additions & 0 deletions examples/domain-adaptation/plot_otda_color_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
OT for image color adaptation
=============================

.. note::
Example added in release: 0.1.9.

This example presents a way of transferring colors between two images
with Optimal Transport as introduced in [6]

Expand Down
3 changes: 3 additions & 0 deletions examples/domain-adaptation/plot_otda_d2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
OT for domain adaptation on empirical distributions
===================================================

.. note::
Example added in release: 0.1.9.

This example introduces a domain adaptation in a 2D setting. It explicit
the problem of domain adaptation and introduces some optimal transport
approaches to solve it.
Expand Down
3 changes: 3 additions & 0 deletions examples/domain-adaptation/plot_otda_jcpot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
OT for multi-source target shift
================================

.. note::
Example added in release: 0.7.0.

This example introduces a target shift problem with two 2D source and 1 target domain.

"""
Expand Down
3 changes: 3 additions & 0 deletions examples/domain-adaptation/plot_otda_laplacian.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
OT with Laplacian regularization for domain adaptation
======================================================

.. note::
Example added in release: 0.7.0.

This example introduces a domain adaptation in a 2D setting and OTDA
approach with Laplacian regularization.

Expand Down
2 changes: 2 additions & 0 deletions examples/domain-adaptation/plot_otda_linear_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Linear OT mapping estimation
============================

.. note::
Example updated in release: 0.9.1.

"""

Expand Down
3 changes: 3 additions & 0 deletions examples/domain-adaptation/plot_otda_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
OT mapping estimation for domain adaptation
===========================================

.. note::
Example added in release: 0.1.9.

This example presents how to use MappingTransport to estimate at the same
time both the coupling transport and approximate the transport map with either
a linear or a kernelized mapping as introduced in [8].
Expand Down
3 changes: 3 additions & 0 deletions examples/domain-adaptation/plot_otda_mapping_colors_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
OT for image color adaptation with mapping estimation
=====================================================

.. note::
Example added in release: 0.1.9.

OT for domain adaptation with image color adaptation [6] with mapping
estimation [8].

Expand Down
3 changes: 3 additions & 0 deletions examples/domain-adaptation/plot_otda_semi_supervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
OTDA unsupervised vs semi-supervised setting
============================================

.. note::
Example added in release: 0.1.9.

This example introduces a semi supervised domain adaptation in a 2D setting.
It explicit the problem of semi supervised domain adaptation and introduces
some optimal transport approaches to solve it.
Expand Down
3 changes: 3 additions & 0 deletions examples/gromov/plot_fgw_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Comparison of Fused Gromov-Wasserstein solvers
==============================

.. note::
Example added in release: 0.9.1.

This example illustrates the computation of FGW for attributed graphs
using 4 different solvers to estimate the distance based on Conditional
Gradient [24], Sinkhorn projections [12, 51] and alternated Bregman
Expand Down
3 changes: 3 additions & 0 deletions examples/gromov/plot_gnn_TFGW.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Graph classification with Template Based Fused Gromov Wasserstein
==============================

.. note::
Example added in release: 0.9.1.

This example first illustrates how to train a graph classification gnn based on the Template Fused Gromov Wasserstein layer as proposed in [52] .

[53] C. Vincent-Cuaz, R. Flamary, M. Corneli, T. Vayer, N. Courty (2022).Template based graph neural network with optimal transport distances. Advances in Neural Information Processing Systems, 35.
Expand Down
4 changes: 4 additions & 0 deletions examples/gromov/plot_gromov.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
==========================
Gromov-Wasserstein example
==========================

.. note::
Example added in release: 0.8.0.

This example is designed to show how to use the Gromov-Wasserstein distance
computation in POT.
We first compare 3 solvers to estimate the distance based on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
(Fused) Gromov-Wasserstein Linear Dictionary Learning
=====================================================

.. note::
Example added in release: 0.8.2.

In this example, we illustrate how to learn a Gromov-Wasserstein dictionary on
a dataset of structured data such as graphs, denoted
:math:`\{ \mathbf{C_s} \}_{s \in [S]}` where every nodes have uniform weights.
Expand Down
3 changes: 3 additions & 0 deletions examples/gromov/plot_partial_fgw.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Plot partial FGW for subgraph matching
=================================

.. note::
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Example added in release: 0.9.6.

This example illustrates the computation of partial (Fused) Gromov-Wasserstein
divergences for subgraph matching tasks, using the exact formulation $p(F)GW$ and
the entropically regularized one $p(F)GW_e$ [18, 29].
Expand Down
3 changes: 3 additions & 0 deletions examples/gromov/plot_quantized_gromov_wasserstein.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Quantized Fused Gromov-Wasserstein examples
===============================================

.. note::
Examples added in release: 0.9.4.

These examples show how to use the quantized (Fused) Gromov-Wasserstein
solvers (qFGW) [68]. POT provides a generic solver `quantized_fused_gromov_wasserstein_partitioned`
that takes as inputs partitioned graphs potentially endowed with node features,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
Semi-relaxed (Fused) Gromov-Wasserstein Barycenter as Dictionary Learning
=====================================================
.. note::
Example added in release: 0.9.5.
In this example, we illustrate how to learn a semi-relaxed Gromov-Wasserstein
(srGW) barycenter using a Block-Coordinate Descent algorithm, on a dataset of
structured data such as graphs, denoted :math:`\{ \mathbf{C_s} \}_{s \in [S]}`
Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_EWCA.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Entropic Wasserstein Component Analysis
=======================================

.. note::
Example added in release: 0.9.1.

This example illustrates the use of EWCA as proposed in [52].


Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_SSNB.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Smooth and Strongly Convex Nearest Brenier Potentials
=====================================================

.. note::
Example added in release: 0.9.2.

This example is designed to show how to use SSNB [58] in POT.
SSNB computes an l-strongly convex potential :math:`\varphi` with an L-Lipschitz gradient such that
:math:`\nabla \varphi \# \mu \approx \nu`. This regularity can be enforced only on the components of a partition
Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_WDA.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Wasserstein Discriminant Analysis
=================================

.. note::
Example added in release: 0.3.0.

This example illustrate the use of WDA as proposed in [11].


Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_WeakOT_VS_OT.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Weak Optimal Transport VS exact Optimal Transport
====================================================

.. note::
Example added in release: 0.8.2.

Illustration of 2D optimal transport between distributions that are weighted
sum of Diracs. The OT matrix is plotted with the samples.

Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_dmmot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Computing d-dimensional Barycenters via d-MMOT
===============================================================================

.. note::
Example added in release: 0.9.1.

When the cost is discretized (Monge), the d-MMOT solver can more quickly
compute and minimize the distance between many distributions without the need
for intermediate barycenter computations. This example compares the time to
Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_factored_coupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Optimal transport with factored couplings
==========================================

.. note::
Example added in release: 0.8.2.

Illustration of the factored coupling OT between 2D empirical distributions

"""
Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Logo of the POT toolbox
=======================

.. note::
Example added in release: 0.8.2.

In this example we plot the logo of the POT toolbox.

This logo is that it is done 100% in Python and generated using
Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_lowrank_GW.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Low rank Gromov-Wasterstein between samples
========================================

.. note::
Example added in release: 0.9.4.

Comparison between entropic Gromov-Wasserstein and Low Rank Gromov Wasserstein [67]
on two curves in 2D and 3D, both sampled with 200 points.

Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_lowrank_sinkhorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Low rank Sinkhorn
========================================

.. note::
Example added in release: 0.9.2.

This example illustrates the computation of Low Rank Sinkhorn [26].

[65] Scetbon, M., Cuturi, M., & Peyré, G. (2021).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Detecting outliers by learning sample marginal distribution with CO-Optimal Transport and by using unbalanced Co-Optimal Transport
======================================================================================================================================

.. note::
Example added in release: 0.9.5.

In this example, we consider two point clouds living in different Euclidean spaces, where the outliers
are artificially injected into the target data. We illustrate two methods which allow to filter out
these outliers.
Expand Down
3 changes: 3 additions & 0 deletions examples/others/plot_screenkhorn_1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Screened optimal transport (Screenkhorn)
========================================

.. note::
Example added in release: 0.7.0.

This example illustrates the computation of Screenkhorn [26].

[26] Alaya M. Z., Bérar M., Gasso G., Rakotomamonjy A. (2019).
Expand Down
3 changes: 3 additions & 0 deletions examples/plot_OT_1D_smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Smooth and sparse OT example
================================

.. note::
Example updated in release: 0.9.1.

This example illustrates the computation of
Smooth and Sparse (KL an L2 reg.) OT and
sparsity-constrained OT, together with their visualizations.
Expand Down
Loading
Loading