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

[GitHub] marcoabreu closed pull request #13830: Remove MXNET_STORAGE_FALLBACK_LOG_VERBOSE warning from test_autograd.py

marcoabreu closed pull request #13830: Remove MXNET_STORAGE_FALLBACK_LOG_VERBOSE warning from test_autograd.py
URL: https://github.com/apache/incubator-mxnet/pull/13830
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/python/unittest/test_autograd.py b/tests/python/unittest/test_autograd.py
index 2f889845af3..5b5aff31231 100644
--- a/tests/python/unittest/test_autograd.py
+++ b/tests/python/unittest/test_autograd.py
@@ -21,6 +21,7 @@
 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 check_unary_func(x):
         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 check_binary_func(x, y):
     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()


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services