Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vertexai/_genai/_evals_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
_thread_local_data = threading.local()

MAX_WORKERS = 100
AGENT_MAX_WORKERS = 10
AGENT_MAX_WORKERS = 20
CONTENT = _evals_constant.CONTENT
PARTS = _evals_constant.PARTS
USER_AUTHOR = _evals_constant.USER_AUTHOR
Expand Down Expand Up @@ -2036,7 +2036,7 @@ async def _execute_local_agent_run_with_retry_async(
)
if attempt == max_retries - 1:
return {"error": f"Resource exhausted after retries: {e}"}
time.sleep(2**attempt)
await asyncio.sleep(2**attempt)
except Exception as e: # pylint: disable=broad-exception-caught
logger.error(
"Unexpected error during generate_content on attempt %d/%d: %s",
Expand All @@ -2047,7 +2047,7 @@ async def _execute_local_agent_run_with_retry_async(

if attempt == max_retries - 1:
return {"error": f"Failed after retries: {e}"}
time.sleep(1)
await asyncio.sleep(1)
return {"error": f"Failed to get agent run results after {max_retries} retries"}


Expand Down
Loading