8000 Update · pytorch/pytorch@52f3cfa · GitHub
[go: up one dir, main page]

Skip to content

Commit 52f3cfa

Browse files
committed
Update
[ghstack-poisoned]
1 parent 6f8788f commit 52f3cfa

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

test/onnx/exporter/test_small_models_e2e.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import logging
77

8-
import torchvision
98
import transformers
109

1110
import torch
@@ -153,23 +152,6 @@ def false_fn(x, z):
153152
onnx_testing.assert_onnx_program(onnx_program)
154153
onnx_testing.assert_onnx_program(onnx_program, args=(torch.tensor([-1, -2]),))
155154

156-
def test_onnx_export_torchvision_ops(self):
157-
class VisionModel(torch.nn.Module):
158-
def __init__(self):
159-
super().__init__()
160-
161-
def forward(self, *x):
162-
out = torchvision.ops.nms(x[0], x[1], x[2])
163-
return out
164-
165-
args = (
166-
torch.tensor([[0, 0, 1, 1], [0.5, 0.5, 1, 1]], dtype=torch.float),
167-
torch.tensor([0.1, 0.2]),
168-
0,
169-
)
170-
onnx_program = self.export(VisionModel(), args)
171-
onnx_testing.assert_onnx_program(onnx_program)
172-
173155
def test_empty(self):
174156
def func(x):
175157
return torch.empty(x.size(), dtype=torch.int64)

torch/onnx/_internal/exporter/_torchlib/ops/nn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""torch.ops.aten operators under the `nn` module."""
22

3-
# mypy: disable-error-code="misc,arg-type,type-arg,valid-type,assignment,return-value,type-var,operator,no-untyped-def,index"
3+
# mypy: disable-error-code="misc,arg-type,type-arg,valid-type,assignment,return-value,type-var,operator,no-untyped-def,index,list-item"
44
# ruff: noqa: TCH001,TCH002
55
# flake8: noqa
66

0 commit comments

Comments
 (0)
0