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

Log total retry attempts and time #660

Closed
rushilsrivastava opened this issue May 11, 2024 · 4 comments
Closed

Log total retry attempts and time #660

rushilsrivastava opened this issue May 11, 2024 · 4 comments

Comments

@rushilsrivastava
Copy link
Contributor

Is there a way to log the total number of validation attempts made? The InstructorRetryException exception contains the total number of attempts and time taken, but I'm hoping to log this total number of retries with time taken, including successful validations, for analytical purposes.

@jxnl
Copy link
Owner

jxnl commented May 11, 2024

you can add callbacks in tenacityhttps://useinstructor.com/concepts/retrying/#retry-callbacks

@rushilsrivastava
Copy link
Contributor Author

rushilsrivastava commented May 17, 2024

Would you be open to a PR, including some more Instructor specific information, like total retries, and completion time, etc. within create_with_completion?

@jxnl
Copy link
Owner

jxnl commented Jun 16, 2024

depends on where that data goes and how you plan to document it!

@ivanleomk
Copy link
Collaborator

Closing this due to inactivity

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