-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixed Bulk Add DatumAlreadyExistsError
and AnnotationAlreadyExistsError
#643
Conversation
client/valor/client.py
Outdated
@@ -192,10 +192,9 @@ def _requests_wrapper( | |||
method_name: str, | |||
endpoint: str, | |||
ignore_auth: bool = False, | |||
max_retries_on_timeout=2, | |||
initial_timeout: float = 2, | |||
timeout: Optional[float] = 2, |
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.
this is one of the reasons you'll see people use 0
or -1
to mean "don't use a timeout" instead of None
client/valor/coretypes.py
Outdated
@@ -1458,6 +1471,7 @@ def create_predictions( | |||
dataset: Dataset, | |||
model: Model, | |||
predictions: List[Prediction], | |||
timeout: Optional[float] = None, |
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.
I didnt make the retry logic configurable, retrying for POST requests is completely removed.
take create_groundtruths
: how is retrying for POST requests completely removed if the user can configure them with a timeout
param?
Co-authored-by: Nick L <nthorlind@gmail.com>
…39-bug-bulk-add-error
Issue
The default timeout was 10s for all requests in the python client. For most requests this is fine, but for bulk add where a large JSON payload would have to be parsed by the API this would cause an early timeout.
This would have been caught earlier but the python client would perform automatic retrying of the POST request. This would immediately cause a conflict on the API-side as the already existing data was being uploaded.
Example
The following shows the same request being resent without the knowledge of the user. The "retry" immediately fails because it directly conflicts with the original request.
Solution