diff options
author | RĂ©mi Flamary <remi.flamary@gmail.com> | 2021-06-17 11:46:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 11:46:37 +0200 |
commit | 8ef3341a472909f223ec0f678f11f136f55c1406 (patch) | |
tree | 162cbd7f7a0e3bd87c2e3b5fe61f70f25ec951c5 /test/test_bregman.py | |
parent | 2dbeeda9308029a8e8db56bed07d48f4d5718efb (diff) |
[MRG] Speedup tests (#262)
* speedup tests
* add color to tests and timings
* add test unbalanced
* stupid missing -
Diffstat (limited to 'test/test_bregman.py')
-rw-r--r-- | test/test_bregman.py | 7 |
1 files changed, 4 insertions, 3 deletions
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) |