-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[OPIK-354] Improve SDK robustness to connection issues #721
[OPIK-354] Improve SDK robustness to connection issues #721
Conversation
8042036
to
a1892e6
Compare
…-cookbook-test-execution
…keepalive expiry time.
967838d
to
9e6e9aa
Compare
…-cookbook-test-execution
instance: Any, decorator: Callable[[Callable], Callable] | ||
) -> None: | ||
attr_name: str | ||
for attr_name in instance.__class__.__dict__.keys(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach works fine. Though we might consider an alternative using a dir(instance)
call. However, we need to verify whether it performs worse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, dir
works better since it also grabs names from parent classes, I updated the implementation.
Details
tenacity
lib, which was added to the dependencies.tokenizers
dependency for py3.8 since it's broken for py3.8Issues
Resolves the issue when the connection is expired during the request processing, request is failing and there are no more attempts to send it. SDK is more robust now to connectivity issues.
Testing
Testing was performed with the cookbooks github action workflow. It was modified to install opik locally instead of downloading it from pypi. The amount of connection/protocol errors reduced significantly and became way more rare, but it is still possible to see such failures sometimes.