diff --git a/ci/build_windows.py b/ci/build_windows.py index 7ec24395e22e..f4cdb6f2132d 100755 --- a/ci/build_windows.py +++ b/ci/build_windows.py @@ -36,8 +36,8 @@ from util import * KNOWN_VCVARS = { - 'VS 2015': r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat', - 'VS 2017': r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsx86_amd64.bat' + 'VS 2015': r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat', + 'VS 2017': r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat' } diff --git a/ci/windows/test_py2_cpu.ps1 b/ci/windows/test_py2_cpu.ps1 index df9b15ba1ec3..a9b30cb22478 100644 --- a/ci/windows/test_py2_cpu.ps1 +++ b/ci/windows/test_py2_cpu.ps1 @@ -23,7 +23,7 @@ $env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 $env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home') C:\Python27\Scripts\pip install -r tests\requirements.txt -C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest +C:\Python27\python.exe -m nose -v -s --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest if (! $?) { Throw ("Error running unittest, python exited with status code " + ('{0:X}' -f $LastExitCode)) } C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train if (! $?) { Throw ("Error running train tests, python exited with status code " + ('{0:X}' -f $LastExitCode)) } diff --git a/ci/windows/test_py3_gpu.ps1 b/ci/windows/test_py3_gpu.ps1 index b6e951b291fb..97324b22e967 100644 --- a/ci/windows/test_py3_gpu.ps1 +++ b/ci/windows/test_py3_gpu.ps1 @@ -25,7 +25,7 @@ $env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home') C:\Python37\Scripts\pip install -r tests\requirements.txt C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest if (! $?) { Throw ("Error running unittest, python exited with status code " + ('{0:X}' -f $LastExitCode)) } -C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py +C:\Python37\python.exe -m nose -v -s --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py if (! $?) { Throw ("Error running tests, python exited with status code " + ('{0:X}' -f $LastExitCode)) } C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py if (! $?) { Throw ("Error running tests, python exited with status code " + ('{0:X}' -f $LastExitCode)) } diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index 1991b16be317..071045379430 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -6837,7 +6837,7 @@ def test_laop_5(): check_numeric_gradient(test_trian, [data_in]) # Tests for linalg.inverse -@with_seed() +@with_seed(1394594398) def test_laop_6(): dtype = np.float64 rtol_fw = 1e-7 diff --git a/tests/python/unittest/test_random.py b/tests/python/unittest/test_random.py index 8fdca619a5c8..720c25d2711e 100644 --- a/tests/python/unittest/test_random.py +++ b/tests/python/unittest/test_random.py @@ -893,14 +893,15 @@ def compute_expected_prob(): def test_shuffle(): def check_first_axis_shuffle(arr): stride = int(arr.size / arr.shape[0]) - column0 = arr.reshape((arr.size,))[::stride].sort() + column0 = arr.reshape((arr.size,))[::stride] seq = mx.nd.arange(0, arr.size - stride + 1, stride, ctx=arr.context) - assert (column0 == seq).prod() == 1 - for i in range(arr.shape[0]): - subarr = arr[i].reshape((arr[i].size,)) - start = subarr[0].asscalar() - seq = mx.nd.arange(start, start + stride, ctx=arr.context) - assert (subarr == seq).prod() == 1 + assert (column0.sort() == seq).prod() == 1 + # Check for ascending flattened-row sequences for 2D or greater inputs. + if stride > 1: + ascending_seq = mx.nd.arange(0, stride, ctx=arr.context) + equalized_columns = arr.reshape((arr.shape[0], stride)) - ascending_seq + column0_2d = column0.reshape((arr.shape[0],1)) + assert (column0_2d == equalized_columns).prod() == 1 # This tests that the shuffling is along the first axis with `repeat1` number of shufflings # and the outcomes are uniformly distributed with `repeat2` number of shufflings.