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

Exponential standoff retry support for handling rate limited embedding functions #614

Merged
merged 7 commits into from
Nov 2, 2023

Conversation

AyushExel
Copy link
Contributor

@AyushExel AyushExel commented Oct 31, 2023

Users ingesting data using rate limited apis don't need to manually make the process sleep for counter rate limits
resolves #579

@AyushExel AyushExel marked this pull request as ready for review November 1, 2023 09:23
f"Maximum number of retries ({max_retries}) exceeded."
)

delay *= exponential_base * (1 + jitter * random.random())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Average exponent here will be 2.5, so last delay with 10 retries could easily be hours. How about setting default max_retries to 7 so max delay is in tens of minutes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great point!

@AyushExel AyushExel merged commit 1589499 into main Nov 2, 2023
9 checks passed
@AyushExel AyushExel deleted the ayush/embedding_fcn_retry branch November 2, 2023 13:50
raghavdixit99 pushed a commit to raghavdixit99/lancedb that referenced this pull request Apr 5, 2024
…g functions (lancedb#614)

Users ingesting data using rate limited apis don't need to manually make
the process sleep for counter rate limits
resolves lancedb#579
westonpace pushed a commit that referenced this pull request Apr 5, 2024
…g functions (#614)

Users ingesting data using rate limited apis don't need to manually make
the process sleep for counter rate limits
resolves #579
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

Successfully merging this pull request may close these issues.

Support rate limiting in embeddings API
2 participants