From 71d7661ff3419d91cbffaa79887740cd964e91e1 Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Wed, 17 Feb 2021 13:26:29 -0500 Subject: [PATCH 1/5] Mark test_masked_softmax as flaky --- tests/python/unittest/test_operator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index cc94db5b0efc..e4badc00a3f6 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -4974,6 +4974,7 @@ def np_masked_log_softmax_grad(out, grad_out, mask, axis=-1, temperature=1.0): @pytest.mark.parametrize('n_broadcast_axis', [0, 1, 2]) @pytest.mark.parametrize('temperature', [1, 5, 9 ,11]) @pytest.mark.parametrize('normalize', [True]) +@pytest.mark.flaky def test_masked_softmax(dtype, axis, ndims, n_broadcast_axis, temperature, normalize): n_broadcast_axis = min(n_broadcast_axis, ndims - 1) shape = rand_shape_nd(ndims, dim=10) @@ -9452,4 +9453,4 @@ def seq_reverse(): seq_last() seq_reverse() - seq_mask() \ No newline at end of file + seq_mask() From fa9111d38a841d8d00891f494d636ebe7b33a121 Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Wed, 17 Feb 2021 16:49:13 -0500 Subject: [PATCH 2/5] Mark test_subgraph_exe1 as flaky --- tests/python/unittest/test_subgraph_op.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/python/unittest/test_subgraph_op.py b/tests/python/unittest/test_subgraph_op.py index 11657ede075e..425a974e5b5d 100644 --- a/tests/python/unittest/test_subgraph_op.py +++ b/tests/python/unittest/test_subgraph_op.py @@ -122,6 +122,7 @@ def get_graphs(): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.flaky def test_subgraph_exe1(sym, subgraph_backend, op_names): """Use the partitioned sym to _simple_bind an executor and compare the outputs with those of the original executor""" From 84d95c7c40d11c93f7d898e90fd39eeb24c9f61d Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Thu, 18 Feb 2021 08:39:33 -0500 Subject: [PATCH 3/5] Disable test_subgraph_exe1 --- tests/python/unittest/test_subgraph_op.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python/unittest/test_subgraph_op.py b/tests/python/unittest/test_subgraph_op.py index 425a974e5b5d..099b93b1147e 100644 --- a/tests/python/unittest/test_subgraph_op.py +++ b/tests/python/unittest/test_subgraph_op.py @@ -122,7 +122,7 @@ def get_graphs(): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) -@pytest.mark.flaky +@pytest.mark.skip(reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe1(sym, subgraph_backend, op_names): """Use the partitioned sym to _simple_bind an executor and compare the outputs with those of the original executor""" From 5be88d69675438b70db3b75b9456cd8d0287a8e3 Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Thu, 25 Feb 2021 15:05:50 -0500 Subject: [PATCH 4/5] Skip more subgraph backend tests on windows --- tests/python/unittest/test_subgraph_op.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/python/unittest/test_subgraph_op.py b/tests/python/unittest/test_subgraph_op.py index 099b93b1147e..5dba46765926 100644 --- a/tests/python/unittest/test_subgraph_op.py +++ b/tests/python/unittest/test_subgraph_op.py @@ -16,6 +16,7 @@ # under the License. import os +import sys import ctypes import mxnet as mx from mxnet.base import SymbolHandle, check_call, _LIB, mx_uint, c_str_array, c_str, mx_real_t @@ -122,7 +123,7 @@ def get_graphs(): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) -@pytest.mark.skip(reason='https://github.com/apache/incubator-mxnet/issues/19915') +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe1(sym, subgraph_backend, op_names): """Use the partitioned sym to _simple_bind an executor and compare the outputs with those of the original executor""" @@ -155,6 +156,7 @@ def test_subgraph_exe1(sym, subgraph_backend, op_names): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe2(sym, subgraph_backend, op_names): """Use env var MXNET_SUBGRAPH_BACKEND=default to trigger graph partitioning in _simple_bind and compare results of the partitioned sym and the original sym.""" @@ -416,6 +418,7 @@ def test_subgraph_exe9(sym, subgraph_backend, op_names): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_backend_gluon(sym, subgraph_backend, op_names, tmp_path): """Call hybridize() to partition the graph, and then compare results of the partitioned sym and the original sym. Here do an inference before hybridizing with the subgraph_backend From a9e10563687e8add26a5da54470fc87a21740210 Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Thu, 25 Feb 2021 18:56:26 -0500 Subject: [PATCH 5/5] other subgraph tests --- tests/python/unittest/test_subgraph_op.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/python/unittest/test_subgraph_op.py b/tests/python/unittest/test_subgraph_op.py index 5dba46765926..51f79914bbad 100644 --- a/tests/python/unittest/test_subgraph_op.py +++ b/tests/python/unittest/test_subgraph_op.py @@ -188,6 +188,7 @@ def get_executor(sym, subgraph_backend=None, op_names=None, original_exec=None): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe3(sym, subgraph_backend, op_names): """Use the partitioned sym to bind an executor and compare the outputs with those of the original executor""" @@ -218,6 +219,7 @@ def test_subgraph_exe3(sym, subgraph_backend, op_names): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe4(sym, subgraph_backend, op_names): """Use env var MXNET_SUBGRAPH_BACKEND=default to trigger graph partitioning in bind and compare results of the partitioned sym and the original sym.""" @@ -269,6 +271,7 @@ def copy_inputs_between_executors(exe1, exe2, input_names): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe5(sym, subgraph_backend, op_names): """Call optimize_for to trigger graph partitioning without infer shapes/types before, then _simple_bind and compare results of the partitioned sym and the original sym.""" @@ -298,6 +301,7 @@ def test_subgraph_exe5(sym, subgraph_backend, op_names): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe6(sym, subgraph_backend, op_names): """Call optimize_for to trigger graph partitioning with shapes/types, then _simple_bind and compare results of the partitioned sym and the original sym.""" @@ -327,6 +331,7 @@ def test_subgraph_exe6(sym, subgraph_backend, op_names): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe7(sym, subgraph_backend, op_names): """Call optimize_for to trigger graph partitioning without infer shapes/types before, then bind and compare results of the partitioned sym and the original sym.""" @@ -356,6 +361,7 @@ def test_subgraph_exe7(sym, subgraph_backend, op_names): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe8(sym, subgraph_backend, op_names): """Call optimize_for to infer shapes, types and dtypes followed by graph partitioning, then bind and compare results of the partitioned sym and the original sym.""" @@ -387,6 +393,7 @@ def test_subgraph_exe8(sym, subgraph_backend, op_names): @pytest.mark.parametrize('subgraph_backend', ['default', 'default_v2']) @pytest.mark.parametrize('sym,op_names', get_graphs()) +@pytest.mark.skipif(sys.platform == "win32", reason='https://github.com/apache/incubator-mxnet/issues/19915') def test_subgraph_exe9(sym, subgraph_backend, op_names): """Call optimize_for to infer shapes, types and dtypes followed by graph partitioning and dedup subgraph, then bind and compare results of the partitioned sym and the original sym."""