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

Attempt to implement new retires #386

Merged
merged 8 commits into from
Feb 1, 2024
Merged

Attempt to implement new retires #386

merged 8 commits into from
Feb 1, 2024

Conversation

jxnl
Copy link
Owner

@jxnl jxnl commented Feb 1, 2024

tests/openai/test_retries.py ........                                                    [100%]
================================ 8 passed, 3 warnings in 30.85s ================================
Ellipsis 🚀 This PR description was created by Ellipsis for commit 6088a45.

Summary:

This PR enhances the retry logic in retry_sync function of instructor/patch.py by implementing tenacity.Retrying object and adding error handling for invalid max_retries input.

Key points:

  • Modified retry_sync function in instructor/patch.py.
  • Replaced existing retry logic with tenacity.Retrying object.
  • Added error handling for invalid max_retries input.

Generated with ❤️ by ellipsis.dev

@jxnl jxnl marked this pull request as ready for review February 1, 2024 18:31
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Changes requested.


Something look wrong? You can customize Ellipsis by editing the ellipsis.yaml for this repository.

Generated with ❤️ by ellipsis.dev

@@ -352,56 +352,79 @@ def retry_sync(
):
Copy link
Contributor

Choose a reason for hiding this comment

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

The function documentation for retry_sync needs to be updated to reflect the changes in the function's behavior. Specifically, the max_retries parameter can now be an int or a tenacity.Retrying object. Please update the function documentation accordingly.

Also, please ensure that the tests for this function are updated to cover the new functionality.

@jxnl jxnl merged commit 91dc19d into main Feb 1, 2024
13 of 15 checks passed
@jxnl jxnl deleted the retries branch February 1, 2024 21:37
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.

None yet

2 participants