@@ -23,7 +23,6 @@ def test_uploading_onnx_model(self):
2323 clf .fit (training_x , training_y )
2424
2525 onnx_clf = to_onnx (clf , training_x [:1 ], options = {'zipmap' : False }, target_opset = 9 )
26- onnx_clf2 = to_onnx (clf , training_x [:1 ], options = {'zipmap' : False }, target_opset = 12 )
2726
2827 with UrllibMocker () as m :
2928 session_id = "c4983c3e-9b53-47ae-bda9-382223bd5081"
@@ -132,23 +131,3 @@ def test_uploading_onnx_model(self):
132131 str (exception .exception ),
133132 'Model output type `TensorProto.INT64` does not match the expected type `RasterDataType.I32`'
134133 )
135-
136- with self .assertRaises (ge .InputException ) as exception :
137- ge .register_ml_model (
138- onnx_model = onnx_clf2 ,
139- model_config = ge .ml .MlModelConfig (
140- name = "foo" ,
141- metadata = MlModelMetadata (
142- file_name = "model.onnx" ,
143- input_type = RasterDataType .F32 ,
144- num_input_bands = 2 ,
145- output_type = RasterDataType .I64 ,
146- ),
147- display_name = "Decision Tree" ,
148- description = "A simple decision tree model" ,
149- )
150- )
151- self .assertEqual (
152- str (exception .exception ),
153- 'Only ONNX models with opset version 9 are supported'
154- )
0 commit comments