@@ -92,17 +92,17 @@ def test_gpt2_preprocessing(self):
92
92
merges_file = util .get_test_data_file ("data" , "gpt2.merges.txt" ),
93
93
)
94
94
inputs = tok .forward (test_sentence )
95
- pnp .export (tok , test_sentence , opset_version = 12 , output_path = "temp_tok2.onnx" )
95
+ pnp .export (tok , test_sentence , opset_version = 14 , output_path = "temp_tok2.onnx" )
96
96
97
97
with open ("temp_gpt2lmh.onnx" , "wb" ) as f :
98
98
torch .onnx .export (
99
- gpt2_m , inputs , f , opset_version = 12 , do_constant_folding = False
99
+ gpt2_m , inputs , f , opset_version = 14 , do_constant_folding = False
100
100
)
101
- pnp .export (gpt2_m , * inputs , opset_version = 12 , do_constant_folding = False )
101
+ pnp .export (gpt2_m , * inputs , opset_version = 14 , do_constant_folding = False )
102
102
full_model = pnp .SequentialProcessingModule (tok , gpt2_m )
103
103
expected = full_model .forward (test_sentence )
104
104
model = pnp .export (
105
- full_model , test_sentence , opset_version = 12 , do_constant_folding = False
105
+ full_model , test_sentence , opset_version = 14 , do_constant_folding = False
106
106
)
107
107
mfunc = OrtPyFunction .from_model (model )
108
108
actuals = mfunc (test_sentence )
0 commit comments