33from io import StringIO
44
55import numpy as np
6- import scipy
76from onnx .defs import onnx_opset_version
87from onnx .reference import ReferenceEvaluator
98from onnxruntime import InferenceSession
2120
2221
2322class TestOrtTensor (ExtTestCase ):
24- @unittest .skipIf (InferenceSession is None , reason = "onnxruntime is needed." )
2523 def test_eager_numpy_type_ort (self ):
2624 def impl (A ):
2725 self .assertIsInstance (A , EagerOrtTensor )
@@ -47,7 +45,6 @@ def impl(A):
4745 self .assertEqualArray (z , res .numpy ())
4846 self .assertEqual (res .numpy ().dtype , np .float64 )
4947
50- @unittest .skipIf (InferenceSession is None , reason = "onnxruntime is needed." )
5148 def test_eager_numpy_type_ort_op (self ):
5249 def impl (A ):
5350 self .assertIsInstance (A , EagerOrtTensor )
@@ -71,7 +68,6 @@ def impl(A):
7168 self .assertEqualArray (z , res .numpy ())
7269 self .assertEqual (res .numpy ().dtype , np .float64 )
7370
74- @unittest .skipIf (InferenceSession is None , reason = "onnxruntime is needed." )
7571 def test_eager_ort (self ):
7672 def impl (A ):
7773 print ("A" )
@@ -145,8 +141,6 @@ def impl(A):
145141 self .assertEqual (tuple (res .shape ()), z .shape )
146142 self .assertStartsWith ("A\n B\n C\n " , text )
147143
148- @unittest .skipIf (InferenceSession is None , reason = "onnxruntime is not available" )
149- @unittest .skipIf (scipy is None , reason = "scipy is not installed." )
150144 def test_cdist_com_microsoft (self ):
151145 from scipy .spatial .distance import cdist as scipy_cdist
152146
0 commit comments