Skip to content
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

Gemini - too many requests causing Internal Server Error (500) #545

Closed
lennijusten opened this issue Sep 27, 2024 · 1 comment
Closed

Gemini - too many requests causing Internal Server Error (500) #545

lennijusten opened this issue Sep 27, 2024 · 1 comment

Comments

@lennijusten
Copy link

lennijusten commented Sep 27, 2024

I'm trying to run Gemini 1.5 pro on various evals and keep encountering an Internal Server Error (500). I opened an issue about this in the google-gemini/generative-ai-python repo and best I can tell this seems to be caused by too many incoming API requests (full trackback and environment details in attached there)

I'm unsure whether it's in the purview of Inspect to handle this, but I wanted to flag the issue.

@lennijusten lennijusten changed the title Gemini rate limit issues Gemini - too many requests causing Internal Server Error (500) Sep 27, 2024
@jjallaire-aisi
Copy link
Collaborator

The thing that controls whether we backoff and retry API errors is this function:

@override
def is_rate_limit(self, ex: BaseException) -> bool:
    return isinstance(
        ex,
        TooManyRequests | InternalServerError | ServiceUnavailable | GatewayTimeout,
    )

https://github.com/UKGovernmentBEIS/inspect_ai/blob/main/src/inspect_ai/model/_providers/google.py#L188-L192

You could play with this to see if there is another exception type that would pickup this error.

You can also use --max-connections to throttle down the number of active connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants