Skip to content

Commit

Permalink
[TESTS] Fix rerun mechanism in case of failed tracing (#26758)
Browse files Browse the repository at this point in the history
### Details:
 - *Fix rerun mechanism in case of failed tracing*

### Tickets:
 - *CVS-153111*

Co-authored-by: Andrei Kochin <[email protected]>
  • Loading branch information
mvafin and andrei-kochin authored Sep 25, 2024
1 parent 094f1bc commit 416bfb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _infer_pipelines(test_input, preprocess_pipeline, input_channels=3):
try:
return _infer_pipelines_impl(test_input, preprocess_pipeline, input_channels)
except RuntimeError as e:
if "builtin cannot be used as a value" in e:
if "builtin cannot be used as a value" in str(e):
# This is a potentially sporadic issue
print(f"An error occurred: {e}. Retrying...")
retries += 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _test(self, model, ref_net, kind, ie_device, precision, ir_version, infer_ti
try:
return self._test_impl(model, ref_net, kind, ie_device, precision, ir_version, infer_timeout, dynamic_shapes, **kwargs)
except RuntimeError as e:
if "builtin cannot be used as a value" in e:
if "builtin cannot be used as a value" in str(e):
# This is a potentially sporadic issue
print(f"An error occurred: {e}. Retrying...")
retries += 1
Expand Down

0 comments on commit 416bfb4

Please sign in to comment.