Repository navigation
fix(sdk): do not retry a 429 quota_exceeded of the evals routes - #213
Merged
Merged
Conversation
The evals routes of ingest answer 429 quota_exceeded when a write goes past a cap of the plan. The Retry-After is the start of the next month, or the header is absent for a gift budget. The two SDKs tried each 429 again, thus an experiment waited approximately 2 minutes for 3 attempts that could not be successful. A 429 quota_exceeded, or a 429 with a Retry-After of more than 60 seconds, now fails at once with the error of the server. A 503 keeps its wait of 60 seconds at most.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a workspace got to a cap of its plan,
runExperimentandrun_experimentwaited approximately 2 minutes before they failed. The Evals routes of ingest answer 429quota_exceededwith aRetry-Afterat the start of the next month. The two SDKs tried each 429 again, after a wait of 60 seconds at most, and got the same 429 each time. The run now fails at once with the error of the server, whose message names the cap.A 429 with the code
quota_exceededgets no retry. This rule also covers a gift budget: its 429 has noRetry-After, so the SDKs tried it again after 1 and then 2 seconds. A 429 with aRetry-Afterof more than 60 seconds also gets no retry, because a retry at 60 seconds gets the same 429. The rate limit of the API counts by the minute, thus itsrate_limited429 keeps its retry. A 503 keeps its wait of 60 seconds at most.score()sends one request with no retry, so it does not change. The two READMEs anddocs/sdk-conformance.mddescribe the new rule.After this merges, telemetry.dev must pin the new SDK and copy the new retry text into its own
docs/sdk-conformance.md. telemetry-dev/telemetry.dev#1090 tracks that work.Fixes telemetry-dev/telemetry.dev#696
Tests:
vp test run tests/experiments.test.ts tests/scores.test.tsandvp test run --changedinpackages/sdk, anduv run pytestinsdks/python.