Fix results validation (#20246)

* Fix results validation

* Remove pt quantization

* Apply suggestions from code review

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Refactor requirements

* Revert "Refactor requirements"

This reverts commit f78fe3d774.

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
This commit is contained in:
Maxim Vafin 2023-10-05 16:31:06 +02:00 committed by GitHub
parent a999e870ae
commit 6664164ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -61,7 +61,7 @@ class TestConvertModel:
def compare_results(self, fw_outputs, ov_outputs):
assert len(fw_outputs) == len(ov_outputs), \
"Different number of outputs between TensorFlow and OpenVINO:" \
"Different number of outputs between framework and OpenVINO:" \
" {} vs. {}".format(len(fw_outputs), len(ov_outputs))
fw_eps = 5e-2
@ -73,13 +73,13 @@ class TestConvertModel:
"OpenVINO outputs does not contain tensor with name {}".format(out_name)
cur_ov_res = ov_outputs[out_name]
print(f"fw_re: {cur_fw_res};\n ov_res: {cur_ov_res}")
is_ok = compare_two_tensors(cur_ov_res, cur_fw_res, fw_eps)
is_ok = is_ok and compare_two_tensors(cur_ov_res, cur_fw_res, fw_eps)
else:
for i in range(len(ov_outputs)):
cur_fw_res = fw_outputs[i]
cur_ov_res = ov_outputs[i]
print(f"fw_res: {cur_fw_res};\n ov_res: {cur_ov_res}")
is_ok = compare_two_tensors(cur_ov_res, cur_fw_res, fw_eps)
is_ok = is_ok and compare_two_tensors(cur_ov_res, cur_fw_res, fw_eps)
assert is_ok, "Accuracy validation failed"
def teardown_method(self):

View File

@ -11,7 +11,6 @@ sacremoses
sentencepiece
datasets
pyctcdecode
pytorch-quantization<=2.1.3 --extra-index-url https://pypi.ngc.nvidia.com
protobuf
soundfile
pandas