Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
increase test tolerance (#20161)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zha0q1 committed Apr 14, 2021
1 parent dd3a6f8 commit 79e0ae7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/python-pytest/onnx/test_onnxruntime_nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def test_bert_inference_onnxruntime(tmp_path, model):
input_dict = dict((session.get_inputs()[i].name, onnx_inputs[i].asnumpy()) for i in range(len(onnx_inputs)))
pred_onx, cls_onx = session.run(None, input_dict)

assert_almost_equal(seq_encoding, pred_onx)
assert_almost_equal(cls_encoding, cls_onx)
assert_almost_equal(seq_encoding, pred_onx, rtol = 0.0001, atol = 0.0025)
assert_almost_equal(cls_encoding, cls_onx, rtol = 0.0001, atol = 0.0025)

finally:
shutil.rmtree(tmp_path)
Expand Down

0 comments on commit 79e0ae7

Please sign in to comment.