File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ def generate_and_validate(
200200
201201 if session :
202202 diff = max_diff (outputs , onnx_results )
203- assert diff ["abs" ] <= atol , (
203+ assert isinstance ( diff [ "abs" ], float ) and diff ["abs" ] <= atol , (
204204 f"Unexpected issue with { type (model )} \n diff={ diff } "
205205 f"\n input_ids.shape={ input_ids .shape } "
206206 f"\n expected={ string_type (outputs , with_shape = True , with_min_max = True )} "
@@ -243,7 +243,7 @@ def generate_and_validate(
243243 )
244244 if session :
245245 diff = max_diff (outputs , onnx_results )
246- assert diff ["abs" ] <= atol , (
246+ assert isinstance ( diff [ "abs" ], float ) and diff ["abs" ] <= atol , (
247247 f"Unexpected issue with { type (model )} , iteration={ iteration } "
248248 f"\n diff={ diff } \n input_ids.shape={ input_ids .shape } "
249249 f"\n expected={ string_type (outputs , with_shape = True , with_min_max = True )} "
You can’t perform that action at this time.
0 commit comments