From: zrphercule Date: Fri, 4 Jan 2019 21:26:32 +0000 (-0800) Subject: Temporarily disable all XXXlike operator tests in pytorch-onnx test (#15740) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~2011 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43761e01f55f7add733ca067c0080f3be667be50;p=platform%2Fupstream%2Fpytorch.git Temporarily disable all XXXlike operator tests in pytorch-onnx test (#15740) Summary: We are going to have some breaking changes in ConstantLike and related operators in onnx, therefore it is better to disable all related tests for these operators for now. These operators are not currently supported by caffe2, and are not included in our most recently released onnx, therefore we do not need to worry about internal/external production breaking. Pull Request resolved: https://github.com/pytorch/pytorch/pull/15740 Differential Revision: D13582528 Pulled By: zrphercule fbshipit-source-id: 92a890c1dc2a833969af69edfea85331bb4d562f --- diff --git a/test/onnx/expect/TestOperators.test_full_like.expect b/test/onnx/expect/TestOperators.test_full_like.expect deleted file mode 100644 index bc85a20..0000000 --- a/test/onnx/expect/TestOperators.test_full_like.expect +++ /dev/null @@ -1,56 +0,0 @@ -ir_version: 3 -producer_name: "pytorch" -producer_version: "0.4" -graph { - node { - input: "0" - output: "1" - op_type: "ConstantLike" - attribute { - name: "dtype" - i: 1 - type: INT - } - attribute { - name: "value" - f: 2 - type: FLOAT - } - } - name: "torch-jit-export" - input { - name: "0" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 4 - } - } - } - } - } - output { - name: "1" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 4 - } - } - } - } - } -} -opset_import { - version: 9 -} diff --git a/test/onnx/expect/TestOperators.test_ones_like.expect b/test/onnx/expect/TestOperators.test_ones_like.expect deleted file mode 100644 index cb34101..0000000 --- a/test/onnx/expect/TestOperators.test_ones_like.expect +++ /dev/null @@ -1,56 +0,0 @@ -ir_version: 3 -producer_name: "pytorch" -producer_version: "0.4" -graph { - node { - input: "0" - output: "1" - op_type: "ConstantLike" - attribute { - name: "dtype" - i: 1 - type: INT - } - attribute { - name: "value" - f: 1 - type: FLOAT - } - } - name: "torch-jit-export" - input { - name: "0" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 6 - } - dim { - dim_value: 10 - } - } - } - } - } - output { - name: "1" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 6 - } - dim { - dim_value: 10 - } - } - } - } - } -} -opset_import { - version: 9 -} diff --git a/test/onnx/expect/TestOperators.test_zeros_like.expect b/test/onnx/expect/TestOperators.test_zeros_like.expect deleted file mode 100644 index d6184a5..0000000 --- a/test/onnx/expect/TestOperators.test_zeros_like.expect +++ /dev/null @@ -1,56 +0,0 @@ -ir_version: 3 -producer_name: "pytorch" -producer_version: "0.4" -graph { - node { - input: "0" - output: "1" - op_type: "ConstantLike" - attribute { - name: "dtype" - i: 1 - type: INT - } - attribute { - name: "value" - f: 0 - type: FLOAT - } - } - name: "torch-jit-export" - input { - name: "0" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 5 - } - dim { - dim_value: 8 - } - } - } - } - } - output { - name: "1" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 5 - } - dim { - dim_value: 8 - } - } - } - } - } -} -opset_import { - version: 9 -} diff --git a/test/onnx/test_operators.py b/test/onnx/test_operators.py index 625cce2..5d5db46 100644 --- a/test/onnx/test_operators.py +++ b/test/onnx/test_operators.py @@ -292,6 +292,7 @@ class TestOperators(TestCase): x = torch.randn(3, 4, requires_grad=True) self.assertONNX(lambda x: torch.full(x.shape, 2), x) + @skipIfCI def test_full_like(self): x = torch.randn(3, 4, requires_grad=True) self.assertONNX(lambda x: torch.full_like(x, 2), x) @@ -479,10 +480,12 @@ class TestOperators(TestCase): x = torch.randn(3, 4) self.assertONNX(torch.nn.Linear(4, 5, bias=True), x) + @skipIfCI def test_zeros_like(self): x = torch.randn(5, 8, requires_grad=True) self.assertONNX(lambda x: torch.zeros_like(x), x) + @skipIfCI def test_ones_like(self): x = torch.randn(6, 10, requires_grad=True) self.assertONNX(lambda x: torch.ones_like(x), x)