[incubator-mxnet] branch v1.7.x updated: Cherrypick Fix nightly large_vector test caused by incorrect with_seed path (#18178) (#18220)

2020-05-04 Thread lausen
This is an automated email from the ASF dual-hosted git repository.

lausen pushed a commit to branch v1.7.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.7.x by this push:
 new 295e939  Cherrypick Fix nightly large_vector test caused by incorrect 
with_seed path (#18178) (#18220)
295e939 is described below

commit 295e93996baeabe5a8b986cfbfd5c6658ebb860d
Author: Chaitanya Prakash Bapat 
AuthorDate: Mon May 4 11:45:20 2020 -0700

Cherrypick Fix nightly large_vector test caused by incorrect with_seed path 
(#18178) (#18220)

* Fix nightly large_vector test caused by incorrect with_seed path (#18178)

* pylint astroid sanity issue
---
 ci/docker/install/requirements |  3 ++-
 tests/nightly/test_large_array.py  |  2 +-
 tests/nightly/test_large_vector.py |  2 +-
 tests/python/unittest/common.py| 23 +--
 4 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/ci/docker/install/requirements b/ci/docker/install/requirements
index 2d5125e..38eb504 100644
--- a/ci/docker/install/requirements
+++ b/ci/docker/install/requirements
@@ -27,7 +27,8 @@ mock==2.0.0
 nose==1.3.7
 nose-timer==0.7.3
 numpy>1.16.0,<2.0.0
-pylint==2.3.1; python_version >= '3.0'
+pylint==2.3.1  # pylint and astroid need to be aligned
+astroid==2.3.3  # pylint and astroid need to be aligned
 requests<2.19.0,>=2.18.4
 scipy==1.2.1
 six==1.11.0
diff --git a/tests/nightly/test_large_array.py 
b/tests/nightly/test_large_array.py
index ee57f17..1528bc0 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/nightly/test_large_vector.py 
b/tests/nightly/test_large_vector.py
index bbad756..70066a2 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/python/unittest/common.py b/tests/python/unittest/common.py
index ab2d191..5253102 100644
--- a/tests/python/unittest/common.py
+++ b/tests/python/unittest/common.py
@@ -310,27 +310,6 @@ def teardown():
 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):
-@make_decorator(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.
@@ -373,4 +352,4 @@ def run_in_spawned_process(func, env, *args):
 finally:
 os.environ.clear()
 os.environ.update(orig_environ)
-return True
\ No newline at end of file
+return True



[incubator-mxnet] branch v1.7.x updated: Cherrypick Fix nightly large_vector test caused by incorrect with_seed path (#18178) (#18220)

2020-05-04 Thread lausen
This is an automated email from the ASF dual-hosted git repository.

lausen pushed a commit to branch v1.7.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.7.x by this push:
 new 295e939  Cherrypick Fix nightly large_vector test caused by incorrect 
with_seed path (#18178) (#18220)
295e939 is described below

commit 295e93996baeabe5a8b986cfbfd5c6658ebb860d
Author: Chaitanya Prakash Bapat 
AuthorDate: Mon May 4 11:45:20 2020 -0700

Cherrypick Fix nightly large_vector test caused by incorrect with_seed path 
(#18178) (#18220)

* Fix nightly large_vector test caused by incorrect with_seed path (#18178)

* pylint astroid sanity issue
---
 ci/docker/install/requirements |  3 ++-
 tests/nightly/test_large_array.py  |  2 +-
 tests/nightly/test_large_vector.py |  2 +-
 tests/python/unittest/common.py| 23 +--
 4 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/ci/docker/install/requirements b/ci/docker/install/requirements
index 2d5125e..38eb504 100644
--- a/ci/docker/install/requirements
+++ b/ci/docker/install/requirements
@@ -27,7 +27,8 @@ mock==2.0.0
 nose==1.3.7
 nose-timer==0.7.3
 numpy>1.16.0,<2.0.0
-pylint==2.3.1; python_version >= '3.0'
+pylint==2.3.1  # pylint and astroid need to be aligned
+astroid==2.3.3  # pylint and astroid need to be aligned
 requests<2.19.0,>=2.18.4
 scipy==1.2.1
 six==1.11.0
diff --git a/tests/nightly/test_large_array.py 
b/tests/nightly/test_large_array.py
index ee57f17..1528bc0 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/nightly/test_large_vector.py 
b/tests/nightly/test_large_vector.py
index bbad756..70066a2 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/python/unittest/common.py b/tests/python/unittest/common.py
index ab2d191..5253102 100644
--- a/tests/python/unittest/common.py
+++ b/tests/python/unittest/common.py
@@ -310,27 +310,6 @@ def teardown():
 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):
-@make_decorator(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.
@@ -373,4 +352,4 @@ def run_in_spawned_process(func, env, *args):
 finally:
 os.environ.clear()
 os.environ.update(orig_environ)
-return True
\ No newline at end of file
+return True



[incubator-mxnet] branch v1.7.x updated: Cherrypick Fix nightly large_vector test caused by incorrect with_seed path (#18178) (#18220)

2020-05-04 Thread lausen
This is an automated email from the ASF dual-hosted git repository.

lausen pushed a commit to branch v1.7.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.7.x by this push:
 new 295e939  Cherrypick Fix nightly large_vector test caused by incorrect 
with_seed path (#18178) (#18220)
295e939 is described below

commit 295e93996baeabe5a8b986cfbfd5c6658ebb860d
Author: Chaitanya Prakash Bapat 
AuthorDate: Mon May 4 11:45:20 2020 -0700

Cherrypick Fix nightly large_vector test caused by incorrect with_seed path 
(#18178) (#18220)

* Fix nightly large_vector test caused by incorrect with_seed path (#18178)

* pylint astroid sanity issue
---
 ci/docker/install/requirements |  3 ++-
 tests/nightly/test_large_array.py  |  2 +-
 tests/nightly/test_large_vector.py |  2 +-
 tests/python/unittest/common.py| 23 +--
 4 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/ci/docker/install/requirements b/ci/docker/install/requirements
index 2d5125e..38eb504 100644
--- a/ci/docker/install/requirements
+++ b/ci/docker/install/requirements
@@ -27,7 +27,8 @@ mock==2.0.0
 nose==1.3.7
 nose-timer==0.7.3
 numpy>1.16.0,<2.0.0
-pylint==2.3.1; python_version >= '3.0'
+pylint==2.3.1  # pylint and astroid need to be aligned
+astroid==2.3.3  # pylint and astroid need to be aligned
 requests<2.19.0,>=2.18.4
 scipy==1.2.1
 six==1.11.0
diff --git a/tests/nightly/test_large_array.py 
b/tests/nightly/test_large_array.py
index ee57f17..1528bc0 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/nightly/test_large_vector.py 
b/tests/nightly/test_large_vector.py
index bbad756..70066a2 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/python/unittest/common.py b/tests/python/unittest/common.py
index ab2d191..5253102 100644
--- a/tests/python/unittest/common.py
+++ b/tests/python/unittest/common.py
@@ -310,27 +310,6 @@ def teardown():
 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):
-@make_decorator(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.
@@ -373,4 +352,4 @@ def run_in_spawned_process(func, env, *args):
 finally:
 os.environ.clear()
 os.environ.update(orig_environ)
-return True
\ No newline at end of file
+return True



[incubator-mxnet] branch v1.7.x updated: Cherrypick Fix nightly large_vector test caused by incorrect with_seed path (#18178) (#18220)

2020-05-04 Thread lausen
This is an automated email from the ASF dual-hosted git repository.

lausen pushed a commit to branch v1.7.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.7.x by this push:
 new 295e939  Cherrypick Fix nightly large_vector test caused by incorrect 
with_seed path (#18178) (#18220)
295e939 is described below

commit 295e93996baeabe5a8b986cfbfd5c6658ebb860d
Author: Chaitanya Prakash Bapat 
AuthorDate: Mon May 4 11:45:20 2020 -0700

Cherrypick Fix nightly large_vector test caused by incorrect with_seed path 
(#18178) (#18220)

* Fix nightly large_vector test caused by incorrect with_seed path (#18178)

* pylint astroid sanity issue
---
 ci/docker/install/requirements |  3 ++-
 tests/nightly/test_large_array.py  |  2 +-
 tests/nightly/test_large_vector.py |  2 +-
 tests/python/unittest/common.py| 23 +--
 4 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/ci/docker/install/requirements b/ci/docker/install/requirements
index 2d5125e..38eb504 100644
--- a/ci/docker/install/requirements
+++ b/ci/docker/install/requirements
@@ -27,7 +27,8 @@ mock==2.0.0
 nose==1.3.7
 nose-timer==0.7.3
 numpy>1.16.0,<2.0.0
-pylint==2.3.1; python_version >= '3.0'
+pylint==2.3.1  # pylint and astroid need to be aligned
+astroid==2.3.3  # pylint and astroid need to be aligned
 requests<2.19.0,>=2.18.4
 scipy==1.2.1
 six==1.11.0
diff --git a/tests/nightly/test_large_array.py 
b/tests/nightly/test_large_array.py
index ee57f17..1528bc0 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/nightly/test_large_vector.py 
b/tests/nightly/test_large_vector.py
index bbad756..70066a2 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/python/unittest/common.py b/tests/python/unittest/common.py
index ab2d191..5253102 100644
--- a/tests/python/unittest/common.py
+++ b/tests/python/unittest/common.py
@@ -310,27 +310,6 @@ def teardown():
 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):
-@make_decorator(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.
@@ -373,4 +352,4 @@ def run_in_spawned_process(func, env, *args):
 finally:
 os.environ.clear()
 os.environ.update(orig_environ)
-return True
\ No newline at end of file
+return True



[incubator-mxnet] branch v1.7.x updated: Cherrypick Fix nightly large_vector test caused by incorrect with_seed path (#18178) (#18220)

2020-05-04 Thread lausen
This is an automated email from the ASF dual-hosted git repository.

lausen pushed a commit to branch v1.7.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.7.x by this push:
 new 295e939  Cherrypick Fix nightly large_vector test caused by incorrect 
with_seed path (#18178) (#18220)
295e939 is described below

commit 295e93996baeabe5a8b986cfbfd5c6658ebb860d
Author: Chaitanya Prakash Bapat 
AuthorDate: Mon May 4 11:45:20 2020 -0700

Cherrypick Fix nightly large_vector test caused by incorrect with_seed path 
(#18178) (#18220)

* Fix nightly large_vector test caused by incorrect with_seed path (#18178)

* pylint astroid sanity issue
---
 ci/docker/install/requirements |  3 ++-
 tests/nightly/test_large_array.py  |  2 +-
 tests/nightly/test_large_vector.py |  2 +-
 tests/python/unittest/common.py| 23 +--
 4 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/ci/docker/install/requirements b/ci/docker/install/requirements
index 2d5125e..38eb504 100644
--- a/ci/docker/install/requirements
+++ b/ci/docker/install/requirements
@@ -27,7 +27,8 @@ mock==2.0.0
 nose==1.3.7
 nose-timer==0.7.3
 numpy>1.16.0,<2.0.0
-pylint==2.3.1; python_version >= '3.0'
+pylint==2.3.1  # pylint and astroid need to be aligned
+astroid==2.3.3  # pylint and astroid need to be aligned
 requests<2.19.0,>=2.18.4
 scipy==1.2.1
 six==1.11.0
diff --git a/tests/nightly/test_large_array.py 
b/tests/nightly/test_large_array.py
index ee57f17..1528bc0 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/nightly/test_large_vector.py 
b/tests/nightly/test_large_vector.py
index bbad756..70066a2 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
 from nose.tools import with_setup
 import unittest
 
diff --git a/tests/python/unittest/common.py b/tests/python/unittest/common.py
index ab2d191..5253102 100644
--- a/tests/python/unittest/common.py
+++ b/tests/python/unittest/common.py
@@ -310,27 +310,6 @@ def teardown():
 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):
-@make_decorator(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.
@@ -373,4 +352,4 @@ def run_in_spawned_process(func, env, *args):
 finally:
 os.environ.clear()
 os.environ.update(orig_environ)
-return True
\ No newline at end of file
+return True