From 8ef3341a472909f223ec0f678f11f136f55c1406 Mon Sep 17 00:00:00 2001 From: RĂ©mi Flamary Date: Thu, 17 Jun 2021 11:46:37 +0200 Subject: [MRG] Speedup tests (#262) * speedup tests * add color to tests and timings * add test unbalanced * stupid missing - --- test/test_bregman.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/test_bregman.py') diff --git a/test/test_bregman.py b/test/test_bregman.py index 9665229..88166a5 100644 --- a/test/test_bregman.py +++ b/test/test_bregman.py @@ -293,7 +293,7 @@ def test_unmix(): def test_empirical_sinkhorn(): # test sinkhorn - n = 100 + n = 10 a = ot.unif(n) b = ot.unif(n) @@ -332,7 +332,7 @@ def test_empirical_sinkhorn(): def test_lazy_empirical_sinkhorn(): # test sinkhorn - n = 100 + n = 10 a = ot.unif(n) b = ot.unif(n) numIterMax = 1000 @@ -342,7 +342,7 @@ def test_lazy_empirical_sinkhorn(): M = ot.dist(X_s, X_t) M_m = ot.dist(X_s, X_t, metric='minkowski') - f, g = ot.bregman.empirical_sinkhorn(X_s, X_t, 1, numIterMax=numIterMax, isLazy=True, batchSize=(1, 1), verbose=True) + f, g = ot.bregman.empirical_sinkhorn(X_s, X_t, 1, numIterMax=numIterMax, isLazy=True, batchSize=(1, 3), verbose=True) G_sqe = np.exp(f[:, None] + g[None, :] - M / 1) sinkhorn_sqe = ot.sinkhorn(a, b, M, 1) @@ -458,6 +458,7 @@ def test_implemented_methods(): ot.bregman.sinkhorn2(a, b, M, epsilon, method=method) +@pytest.mark.filterwarnings("ignore:Bottleneck") def test_screenkhorn(): # test screenkhorn rng = np.random.RandomState(0) -- cgit v1.2.3