You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ta...@apache.org on 2019/03/20 07:07:34 UTC
[incubator-mxnet] branch master updated: Fixes the test_sgld
(#14473)
This is an automated email from the ASF dual-hosted git repository.
taolv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 56b7b67 Fixes the test_sgld (#14473)
56b7b67 is described below
commit 56b7b67d10d36ae97c380ef7630caa307b9ce7d1
Author: Jake Lee <gs...@gmail.com>
AuthorDate: Wed Mar 20 15:07:14 2019 +0800
Fixes the test_sgld (#14473)
* fix the test_sgld
* retrigger CI
---
tests/python/unittest/test_optimizer.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/python/unittest/test_optimizer.py b/tests/python/unittest/test_optimizer.py
index 68aa5f8..d5aabcb 100644
--- a/tests/python/unittest/test_optimizer.py
+++ b/tests/python/unittest/test_optimizer.py
@@ -461,7 +461,6 @@ class PySGLD(mx.optimizer.Optimizer):
@with_seed()
-@unittest.skip("test fails intermittently. temporarily disabled till it gets fixed. tracked at https://github.com/apache/incubator-mxnet/issues/14241")
def test_sgld():
opt1 = PySGLD
opt2 = mx.optimizer.SGLD
@@ -518,7 +517,9 @@ def test_sgld():
if (dtype == np.float16 and ('multi_precision' not in kwarg or
not kwarg['multi_precision'])):
continue
- compare_optimizer_noise_seeded(opt1(**kwarg), opt2(**kwarg), shape, dtype, seed)
+ atol = 1e-2 if dtype == np.float16 else 1e-3
+ rtol = 1e-4 if dtype == np.float16 else 1e-5
+ compare_optimizer_noise_seeded(opt1(**kwarg), opt2(**kwarg), shape, dtype, seed, atol=atol, rtol=rtol)