From d4ee7065d71207cf9244b294090e5696425be65b Mon Sep 17 00:00:00 2001 From: alexandra-dinu0504 Date: Fri, 27 Nov 2026 15:43:49 +0100 Subject: [PATCH 1/3] Fixed error message for regularised, lazy, unbalanced solver --- ot/solvers/_linear.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ot/solvers/_linear.py b/ot/solvers/_linear.py index 9f6c4396f..2d5b032c1 100644 --- a/ot/solvers/_linear.py +++ b/ot/solvers/_linear.py @@ -1625,7 +1625,7 @@ def solve_sample( else: raise ( NotImplementedError( - 'Not implemented unbalanced_type="{}" with regularization'.format( + 'Regularized lazy solver with unbalanced_type="{}" not implemented'.format( unbalanced_type ) ) From c6e989e06e821fc40aa9cebf686716b55c185fff Mon Sep 17 00:00:00 2001 From: alexandra-dinu0504 Date: Fri, 27 Nov 2026 15:54:12 +0100 Subject: [PATCH 2/3] Fixed error message for regularised lazy unbalanced solver --- ot/solvers/_linear.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ot/solvers/_linear.py b/ot/solvers/_linear.py index 2d5b032c1..90ea93627 100644 --- a/ot/solvers/_linear.py +++ b/ot/solvers/_linear.py @@ -1625,9 +1625,7 @@ def solve_sample( else: raise ( NotImplementedError( - 'Regularized lazy solver with unbalanced_type="{}" not implemented'.format( - unbalanced_type - ) + "Regularized lazy solver not implemented for unbalanced OT" ) ) From 4f8cbdc838d4b5b8d2840d0ac49387b9fdc81fd4 Mon Sep 17 00:00:00 2001 From: alexandra-dinu0504 Date: Fri, 27 Nov 2026 16:34:32 +0100 Subject: [PATCH 3/3] Add RELEASES.md entry for PR#941 --- RELEASES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASES.md b/RELEASES.md index 58391f283..78f17f27a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -26,6 +26,7 @@ - Fix ordinary JAX gradients for dense `ot.emd2` and preserve the magnitude and higher-order dependence of gradients supplied to `JaxBackend.set_gradients`, including the envelope gradients in `ot.solve` (Issue #625) - Fix `ot.semidiscrete_wasserstein2_unif_circle` pairing sorted sample locations with unsorted weights, which broke permutation and rotation invariance for nonuniform weights (Issue #921) - Fix an out-of-bounds read in `ot.bsp.merge_bijections`: the number of plans was taken from `perms.shape[1]` (the number of samples) instead of `perms.shape[0]`, so merging fewer plans than samples read past the array and merging more silently dropped plans. A `perms` outside the documented `(n_plans, n_samples)` layout, an empty plan stack and rows that are not permutations are now rejected (PR #911, Issue #910) +- Fix the misleading error message of `ot.solve_sample` with `lazy=True`, `reg>0` and `unbalanced`, which blamed the regularization while the limitation comes from the lazy solver (PR #941) - Fix overflow to NaN in `ot.stochastic.coordinate_grad_semi_dual` by shifting before exponentiating, as `ot.stochastic.c_transform_entropic` already does. The factor cancels in the normalisation, so results are unchanged where the old code did not overflow (PR #866, Issue #264) - Fix `ot.bsp.compute_bspot_bijection` (and `random_state` of `ot.solve_sample(..., method="bsp")`) not being reproducible for a given `seed`: its candidate plans came from a `thread_local` `std::mt19937` seeded once per OpenMP thread, so the result depended on the call history and on the number of threads. Every thread started from the same state, so the previous version could underperform with multiple threads. Each plan now draws its own stream, derived from the seed and the plan index (PR #898, Issue #897) - Fix duplicate function and class descriptions in generated module API pages while preserving top-level aliases and example backreferences (Issue #527)