Repository navigation
Conversation
HttpRetryOptions were attached to judge requests and then ignored for TimeoutError, so one client timeout marked the sample not evaluated. The judge now retries that timeout, and an auth timeout, for the configured number of attempts. Fixes google#8075
LlmAsJudge, HallucinationsV1, and the per-turn quality judge attached HttpRetryOptions and then failed the sample on the first TimeoutError. They now share a tenacity retry that honors those options. Fixes google#8075
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
Eval judges attach
HttpRetryOptions, but a clientTimeoutErrorstill fails the sample on the first try.TimeoutErroris not in google-genai's aiohttp transient set, and a non-Gemini judge never reads the retry options.LlmAsJudge,HallucinationsV1Evaluator, andPerTurnUserSimulatorQualityV1do not retry the timeout themselves, so one timed-out sample marks the invocation NOT_EVALUATED.Solution:
read_judge_response_with_retrybuilds a tenacityAsyncRetryingfrom the request'sHttpRetryOptions(attempts, backoff, jitter) and logs each retry. The three judges above call it. Other errors are not retried. When attempts are used up the sample stays not evaluated. User simulators are not in this change, and google-genai's transient list is not modified.Testing Plan
Unit Tests:
test_read_judge_response_retries_a_timeoutcovers both timeout types.test_read_judge_response_stops_after_the_attempt_countstops atattempts=2.test_read_judge_response_does_not_retry_other_errorskeeps aRuntimeErrorto one call.test_evaluate_invocations_retries_a_judge_timeoutchecksLlmAsJudgeuses the helper.106 passed. mypy on the four source files: no issues.
Manual End-to-End (E2E) Tests:
I did not run
adk evalagainst a live model. The tests use a mocked judge.Checklist