Temporarily disable all XXXlike operator tests in pytorch-onnx test (#15740)
authorzrphercule <zrphercule@gmail.com>
Fri, 4 Jan 2019 21:26:32 +0000 (13:26 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 4 Jan 2019 21:36:09 +0000 (13:36 -0800)
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

test/onnx/expect/TestOperators.test_full_like.expect [deleted file]
test/onnx/expect/TestOperators.test_ones_like.expect [deleted file]
test/onnx/expect/TestOperators.test_zeros_like.expect [deleted file]
test/onnx/test_operators.py

diff --git a/test/onnx/expect/TestOperators.test_full_like.expect b/test/onnx/expect/TestOperators.test_full_like.expect
deleted file mode 100644 (file)
index bc85a20..0000000
+++ /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 (file)
index cb34101..0000000
+++ /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 (file)
index d6184a5..0000000
+++ /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
-}
index 625cce2..5d5db46 100644 (file)
@@ -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)