You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by la...@apache.org on 2020/04/29 03:24:50 UTC
[incubator-mxnet] branch master updated: Fix nightly large_vector
test caused by incorrect with_seed path (#18178)
This is an automated email from the ASF dual-hosted git repository.
lausen 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 7145250 Fix nightly large_vector test caused by incorrect with_seed path (#18178)
7145250 is described below
commit 7145250f335f38c6648a8fd2ca8cec302fd81ca2
Author: Chaitanya Prakash Bapat <ch...@gmail.com>
AuthorDate: Tue Apr 28 20:23:57 2020 -0700
Fix nightly large_vector test caused by incorrect with_seed path (#18178)
---
tests/nightly/test_large_array.py | 2 +-
tests/nightly/test_large_vector.py | 2 +-
tests/python/unittest/common.py | 21 ---------------------
3 files changed, 2 insertions(+), 23 deletions(-)
diff --git a/tests/nightly/test_large_array.py b/tests/nightly/test_large_array.py
index 0f0b373..67efc45 100644
--- a/tests/nightly/test_large_array.py
+++ b/tests/nightly/test_large_array.py
@@ -27,7 +27,7 @@ sys.path.append(os.path.join(curr_path, '../python/unittest/'))
from mxnet.test_utils import rand_ndarray, assert_almost_equal, rand_coord_2d, default_context, check_symbolic_forward, create_2d_tensor
from mxnet import gluon, nd
-from common import with_seed, with_post_test_cleanup
+from common import with_seed
import unittest
# dimension constants
diff --git a/tests/nightly/test_large_vector.py b/tests/nightly/test_large_vector.py
index 57fecaa..dafbc1e 100644
--- a/tests/nightly/test_large_vector.py
+++ b/tests/nightly/test_large_vector.py
@@ -27,7 +27,7 @@ sys.path.append(os.path.join(curr_path, '../python/unittest/'))
from mxnet.test_utils import rand_ndarray, assert_almost_equal, rand_coord_2d, create_vector
from mxnet import gluon, nd
-from tests.python.unittest.common import with_seed
+from common import with_seed
import unittest
# dimension constants
diff --git a/tests/python/unittest/common.py b/tests/python/unittest/common.py
index eac0265..ca88430 100644
--- a/tests/python/unittest/common.py
+++ b/tests/python/unittest/common.py
@@ -310,27 +310,6 @@ def teardown_module():
mx.nd.waitall()
-def with_post_test_cleanup():
- """
- Helper function that cleans up memory by releasing it from memory pool
- Required especially by large tensor tests that have memory footprints in GBs.
- """
- def test_helper(orig_test):
- @functools.wraps(orig_test)
- def test_new(*args, **kwargs):
- logger = default_logger()
- try:
- orig_test(*args, **kwargs)
- except:
- logger.info(test_msg)
- raise
- finally:
- mx.nd.waitall()
- mx.cpu().empty_cache()
- return test_new
- return test_helper
-
-
def run_in_spawned_process(func, env, *args):
"""
Helper function to run a test in its own process.