-
Notifications
You must be signed in to change notification settings - Fork 234
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
Only store channel if use_cached_channel is true #387
Conversation
@Tabrizian would you mind having a look at this? We have to keep an internal fork because of this behaviour. I already have the CLA signed (for my organisation Speechmatics) |
@debermudez is this something that you could help with reviewing? |
Yea. I will make a ticket to track this and look at it next week. |
@HennerM I have not forgotten about this, but was unfortunately sidetracked. I am trying to review this today. |
I completely missed your second message. Nevermind my ask. |
@debermudez Thanks, is this still being worked at? |
I'm also looking forward to having the changes proposed by @HennerM being integrated to this repo, as this is also a need we recently had ! 👍 |
@Tabrizian did this get lost? |
Sorry no it did not get lost. |
Hello. Looking into this now. As an FYI, this will be added to the 24.05 release instead of 24.04 since it was not prioritized for this release. |
Thanks! That's okay, we waited already some time, the one month is not going to make a big difference :) |
Merging with #465 and tested with triton-inference-server/server#7123 after pre-commit passes |
Adding testing to verify new use_cached_channel behavior. To be merged after #387 Server test: triton-inference-server/server#7123 --------- Co-authored-by: Markus Hennerbichler <[email protected]> Co-authored-by: Katherine Yang <[email protected]> Co-authored-by: Katherine Yang <[email protected]>
The gRPC client exposes a parameter that disables reusing a cached channel: use_cached_channel. Setting this to false doesn't stop the channel (and mock) from being inserted to the internal channel cache. The problem with it being inserted to the map means the channel will only get destroyed once it's being replaced by another channel. In our case we want the channel (and associated connection) to be closed as soon as the client using it is getting destroyed though, meaning we don't want to reuse the channel at all. I believe this is also consistent with the description for use_cached_channel: If false, a new channel is created for each new client instance. When true, re-use old channels from cache for new client instances. The default value is true
Adding testing to verify new use_cached_channel behavior. To be merged after #387 Server test: triton-inference-server/server#7123 --------- Co-authored-by: Markus Hennerbichler <[email protected]> Co-authored-by: Katherine Yang <[email protected]> Co-authored-by: Katherine Yang <[email protected]>
The gRPC client exposes a parameter that disables reusing a cached channel: use_cached_channel. Setting this to false doesn't stop the channel (and mock) from being inserted to the internal channel cache. The problem with it being inserted to the map means the channel will only get destroyed once it's being replaced by another channel. In our case we want the channel (and associated connection) to be closed as soon as the client using it is getting destroyed though, meaning we don't want to reuse the channel at all. I believe this is also consistent with the description for use_cached_channel: If false, a new channel is created for each new client instance. When true, re-use old channels from cache for new client instances. The default value is true
Adding testing to verify new use_cached_channel behavior. To be merged after #387 Server test: triton-inference-server/server#7123 --------- Co-authored-by: Markus Hennerbichler <[email protected]> Co-authored-by: Katherine Yang <[email protected]> Co-authored-by: Katherine Yang <[email protected]>
Thanks for getting this merged! |
The gRPC client exposes a parameter that disables reusing a cached channel:
use_cached_channel
.Setting this to false doesn't stop the channel (and mock) from being inserted to the internal channel cache. The problem with it being inserted to the map means the channel will only get destroyed once it's being replaced by another channel.
In our case we want the channel (and associated connection) to be closed as soon as the client using it is getting destroyed though, meaning we don't want to reuse the channel at all. I believe this is also consistent with the description for
use_cached_channel
: