File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
tests/tests_pytorch/models Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 3232from tests_pytorch .helpers .runif import RunIf
3333from tests_pytorch .utilities .test_model_summary import UnorderedModel
3434
35- if _TORCH_GREATER_EQUAL_2_6 :
36- from torch .onnx import ONNXProgram
37- else :
38- from torch .onnx ._internal .exporter import ONNXProgram
39-
4035
4136@RunIf (onnx = True )
4237def test_model_saves_with_input_sample (tmp_path ):
@@ -208,6 +203,11 @@ def test_model_onnx_export_missing_onnxscript():
208203
209204@RunIf (onnx = True , min_torch = "2.5.0" , dynamo = True , onnxscript = True )
210205def test_model_return_type ():
206+ if _TORCH_GREATER_EQUAL_2_6 :
207+ from torch .onnx import ONNXProgram
208+ else :
209+ from torch .onnx ._internal .exporter import ONNXProgram
210+
211211 model = BoringModel ()
212212 model .example_input_array = torch .randn ((1 , 32 ))
213213 model .eval ()
You can’t perform that action at this time.
0 commit comments