Skip to content

Commit 416bfb4

Browse files
[TESTS] Fix rerun mechanism in case of failed tracing (#26758)
### Details: - *Fix rerun mechanism in case of failed tracing* ### Tickets: - *CVS-153111* Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
1 parent 094f1bc commit 416bfb4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/layer_tests/py_frontend_tests/test_torchvision_preprocessor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _infer_pipelines(test_input, preprocess_pipeline, input_channels=3):
3636
try:
3737
return _infer_pipelines_impl(test_input, preprocess_pipeline, input_channels)
3838
except RuntimeError as e:
39-
if "builtin cannot be used as a value" in e:
39+
if "builtin cannot be used as a value" in str(e):
4040
# This is a potentially sporadic issue
4141
print(f"An error occurred: {e}. Retrying...")
4242
retries += 1

tests/layer_tests/pytorch_tests/pytorch_layer_test_class.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _test(self, model, ref_net, kind, ie_device, precision, ir_version, infer_ti
7676
try:
7777
return self._test_impl(model, ref_net, kind, ie_device, precision, ir_version, infer_timeout, dynamic_shapes, **kwargs)
7878
except RuntimeError as e:
79-
if "builtin cannot be used as a value" in e:
79+
if "builtin cannot be used as a value" in str(e):
8080
# This is a potentially sporadic issue
8181
print(f"An error occurred: {e}. Retrying...")
8282
retries += 1

0 commit comments

Comments
 (0)