Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Remove MXNET_STORAGE_FALLBACK_LOG_VERBOSE warning from test_autograd.py #13830

Merged
merged 1 commit into from
Jan 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions tests/python/unittest/test_autograd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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():
Expand All @@ -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()
Expand Down