Skip to content

Commit

Permalink
[TESTS] Remove restart condition as it happens in nested exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mvafin committed Oct 11, 2024
1 parent faa3ab2 commit c0485d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ 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 str(e):
# This is a potentially sporadic issue
print(f"An error occurred: {e}. Retrying...")
retries += 1
else:
raise
# This is a potentially sporadic issue
print(f"An error occurred: {e}. Retrying...")
retries += 1
else:
print("Max retries reached. Function execution failed.")

Expand Down
9 changes: 3 additions & 6 deletions tests/layer_tests/pytorch_tests/pytorch_layer_test_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,9 @@ 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 str(e):
# This is a potentially sporadic issue
print(f"An error occurred: {e}. Retrying...")
retries += 1
else:
raise
# This is a potentially sporadic issue
print(f"An error occurred: {e}. Retrying...")
retries += 1
else:
print("Max retries reached. Function execution failed.")

Expand Down

0 comments on commit c0485d7

Please sign in to comment.