From c658d9b21bd453904ff9c485e8a9e65608b1eabb Mon Sep 17 00:00:00 2001 From: Spandan Tiwari Date: Wed, 6 Mar 2019 11:03:32 -0800 Subject: [PATCH] Temporarily disable Upsample operator tests in pytorch-onnx tests (#17696) Summary: In discussion with houseroad, because Upsample op is being updated in ONNX https://github.com/onnx/onnx/pull/1773 and these tests are blocking it. These tests will be updated once the ONNX PR goes in. Pull Request resolved: https://github.com/pytorch/pytorch/pull/17696 Differential Revision: D14338845 Pulled By: houseroad fbshipit-source-id: cfaf8cf1ab578ae69dd3bf21b1c0681b572b9b6f --- .../onnx/expect/TestOperators.test_upsample.expect | 77 ---------------------- test/onnx/test_models.py | 1 + test/onnx/test_operators.py | 1 + test/onnx/test_pytorch_onnx_caffe2.py | 1 + 4 files changed, 3 insertions(+), 77 deletions(-) delete mode 100644 test/onnx/expect/TestOperators.test_upsample.expect diff --git a/test/onnx/expect/TestOperators.test_upsample.expect b/test/onnx/expect/TestOperators.test_upsample.expect deleted file mode 100644 index 40fa9d5..0000000 --- a/test/onnx/expect/TestOperators.test_upsample.expect +++ /dev/null @@ -1,77 +0,0 @@ -ir_version: 4 -producer_name: "pytorch" -producer_version: "1.1" -graph { - node { - output: "1" - op_type: "Constant" - attribute { - name: "value" - t { - dims: 4 - data_type: 1 - raw_data: "\000\000\200?\000\000\200?\000\000\000@\000\000\000@" - } - type: TENSOR - } - } - node { - input: "input" - input: "1" - output: "2" - op_type: "Upsample" - attribute { - name: "mode" - s: "linear" - type: STRING - } - } - name: "torch-jit-export" - input { - name: "input" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 2 - } - dim { - dim_value: 3 - } - dim { - dim_value: 4 - } - } - } - } - } - output { - name: "2" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 2 - } - dim { - dim_value: 6 - } - dim { - dim_value: 8 - } - } - } - } - } -} -opset_import { - version: 10 -} diff --git a/test/onnx/test_models.py b/test/onnx/test_models.py index f3cbc44..f9bbc10 100644 --- a/test/onnx/test_models.py +++ b/test/onnx/test_models.py @@ -138,6 +138,7 @@ class TestModels(TestCase): sqnet_v1_1 = SqueezeNet(version=1.1) self.exportTest(toC(sqnet_v1_1), toC(x)) + @unittest.skip("Temporary - waiting for https://github.com/onnx/onnx/pull/1773.") def test_densenet(self): # Densenet-121 model x = Variable(torch.randn(BATCH_SIZE, 3, 224, 224).fill_(1.0)) diff --git a/test/onnx/test_operators.py b/test/onnx/test_operators.py index 1a680a9..d8d0c42 100644 --- a/test/onnx/test_operators.py +++ b/test/onnx/test_operators.py @@ -455,6 +455,7 @@ class TestOperators(TestCase): x = torch.randn(1, 2, 3, 4, requires_grad=True) self.assertONNX(lambda x: x.norm(p=2, dim=2), (x)) + @unittest.skip("Temporary - waiting for https://github.com/onnx/onnx/pull/1773.") def test_upsample(self): x = torch.randn(1, 2, 3, 4, requires_grad=True) self.assertONNX(lambda x: nn.functional.interpolate(x, scale_factor=2., mode='bilinear'), x) diff --git a/test/onnx/test_pytorch_onnx_caffe2.py b/test/onnx/test_pytorch_onnx_caffe2.py index 1d9fc26..89a8923 100644 --- a/test/onnx/test_pytorch_onnx_caffe2.py +++ b/test/onnx/test_pytorch_onnx_caffe2.py @@ -808,6 +808,7 @@ class TestCaffe2Backend(unittest.TestCase): x = torch.randn(4, 3, 2, 1, requires_grad=True) self.run_model_test(MyModel(), train=False, input=(x), batch_size=BATCH_SIZE, use_gpu=False) + @unittest.skip("Temporary - waiting for https://github.com/onnx/onnx/pull/1773.") def test_upsample(self): x = torch.randn(1, 2, 3, 4, requires_grad=True) model = nn.Upsample(scale_factor=2, mode='nearest') -- 2.7.4