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

fix(ml): limit load retries #10494

Merged
merged 2 commits into from
Jun 20, 2024
Merged

fix(ml): limit load retries #10494

merged 2 commits into from
Jun 20, 2024

Conversation

mertalev
Copy link
Contributor

Description

The ML service tries to load a model, then on failure clears the cache and retries once. However, a new request will mean another two attempts to load. Given that the service can receive many requests for a model, failing to load/download can cause an excessive number of attempts.

This PR limits a single model instance to one retry across its lifetime. After a model is unloaded or the service restarts, it will be able to re-attempt it.

How Has This Been Tested?

Tested by making a model throw an error on the first attempt, but not the second, and confirming that it still loaded. If I made it throw an error every time, it didn't try to load the model repeatedly.

@mertalev mertalev merged commit a42af06 into main Jun 20, 2024
22 checks passed
@mertalev mertalev deleted the fix/ml-limit-retries branch June 20, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants