triton-inference-server / pytriton

PyTriton is a Flask/FastAPI-like interface that simplifies Triton's deployment in Python environments.
https://triton-inference-server.github.io/pytriton/
Apache License 2.0
687 stars 45 forks source link

tritonclient.grpc doesn't support timeout for other commands than infer. #39

Closed dogky123 closed 5 months ago

dogky123 commented 8 months ago

Description [ WARNING] client.py:207 - tritonclient.grpc doesn't support timeout for other commands than infer. Ignoring network_timeout: 60.0.

To reproduce ModelClient(url='grpc://172.19.16.45:8001',model_name='test')

Question How to ignore the warning or fix this warning

piotrm-nvidia commented 8 months ago

Thank you for your feature request and your interest in PyTriton. I appreciate your feedback and I will try to help you with your issue.

ModelClient uses tritonclient.grpc.InferenceServerClient to communicate with the Triton server over GRPC protocol. However, this client does not support timeout parameter for the whole connection and for the configuration and status methods. These methods are used by ModelClient to send configuration requests before any inference request is sent.

Therefore, ModelClient cannot enforce any timeout different than the default for GRPC connections when using GRPC protocol. You can use HTTP protocol instead, which does not have this limitation, if you want to avoid this warning.

The extension of tritonclient.grpc API with more timeouts is not planned soon, as far as I know.

We are considering two possible solutions for ModelClient to make this warning less intrusive:

We would love to hear your opinion on these solutions. Please let us know what you think and if you have any other suggestions. Thank you for your cooperation and understanding.

piotrm-nvidia commented 8 months ago

See: https://github.com/triton-inference-server/pytriton/issues/38

dogky123 commented 8 months ago

Thank you for your replying. I usually use warnings.filterwarnings to ignore the warning for other libs. It woule be better if i can apply it to pytriton.

piotrm-nvidia commented 5 months ago

Warnings support was added from release 0.4.2.