-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline retries #908
Pipeline retries #908
Conversation
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
response = annotator.annotate(request) | ||
break | ||
except Exception as e: | ||
logger.warning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a pause before the retry?
response = sut.evaluate(request) | ||
break | ||
except Exception as e: | ||
logger.warning(f"Exception calling SUT {sut.uid} on attempt {tries}: {e}\nRetrying.....", exc_info=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pause before retry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 10 seconds enough you think?
@@ -239,6 +242,22 @@ def test_annotator_worker_cache_different_annotators(annotators, tmp_path): | |||
assert annotators["annotator_dict"].annotate_calls == 1 | |||
|
|||
|
|||
def test_annotator_worker_retries_until_success(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
The pipeline runner (which used by
run-job
andrun-csv-items
) now will keep retrying calls to SUTs and annotators until it gets a successful response. It logs exceptions and retry counts so that a user can manually stop the command if they see that it is retrying an impossible exception a million times.