You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ma...@apache.org on 2019/01/11 00:08:41 UTC

[incubator-mxnet] branch master updated: Remove MXNET_STORAGE_FALLBACK_LOG_VERBOSE from test_autograd.py (#13830)

This is an automated email from the ASF dual-hosted git repository.

marcoabreu 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 abb7ce5  Remove MXNET_STORAGE_FALLBACK_LOG_VERBOSE from test_autograd.py (#13830)
abb7ce5 is described below

commit abb7ce528cf18fbc6bed29c920331212cf0fbb3a
Author: Pedro Larroy <pe...@gmail.com>
AuthorDate: Fri Jan 11 01:08:24 2019 +0100

    Remove MXNET_STORAGE_FALLBACK_LOG_VERBOSE from test_autograd.py (#13830)
---
 tests/python/unittest/test_autograd.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/tests/python/unittest/test_autograd.py b/tests/python/unittest/test_autograd.py
index 2f88984..5b5aff3 100644
--- a/tests/python/unittest/test_autograd.py
+++ b/tests/python/unittest/test_autograd.py
@@ -21,6 +21,7 @@ from mxnet.ndarray import zeros_like
 from mxnet.autograd import *
 from mxnet.test_utils import *
 from common import setup_module, with_seed, teardown
+from mxnet.test_utils import EnvManager
 
 
 def grad_and_loss(func, argnum=None):
@@ -120,8 +121,9 @@ def test_unary_func():
         autograd_assert(x, func=f_square, grad_func=f_square_grad)
     uniform = nd.uniform(shape=(4, 5))
     stypes = ['default', 'row_sparse', 'csr']
-    for stype in stypes:
-        check_unary_func(uniform.tostype(stype))
+    with EnvManager('MXNET_STORAGE_FALLBACK_LOG_VERBOSE', '0'):
+        for stype in stypes:
+            check_unary_func(uniform.tostype(stype))
 
 @with_seed()
 def test_binary_func():
@@ -138,11 +140,12 @@ def test_binary_func():
     uniform_x = nd.uniform(shape=(4, 5))
     uniform_y = nd.uniform(shape=(4, 5))
     stypes = ['default', 'row_sparse', 'csr']
-    for stype_x in stypes:
-        for stype_y in stypes:
-            x = uniform_x.tostype(stype_x)
-            y = uniform_y.tostype(stype_y)
-            check_binary_func(x, y)
+    with EnvManager('MXNET_STORAGE_FALLBACK_LOG_VERBOSE', '0'):
+        for stype_x in stypes:
+            for stype_y in stypes:
+                x = uniform_x.tostype(stype_x)
+                y = uniform_y.tostype(stype_y)
+                check_binary_func(x, y)
 
 
 @with_seed()