From db1fe34cf75edfc98aa8dc454a1af9c67b1703ad Mon Sep 17 00:00:00 2001 From: Indrajit Bhosale Date: Wed, 14 Aug 2024 10:37:15 -0700 Subject: [PATCH 1/4] Docs for GRPC Error codes --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index ea710bbb7..2f89a2578 100644 --- a/README.md +++ b/README.md @@ -585,7 +585,20 @@ server side. If writing your own gRPC clients in the language of choice consult gRPC guide on [cancellation](https://grpc.io/docs/guides/cancellation/#cancelling-an-rpc-call-on-the-client-side). +### GRPC Error Status Codes +Starting from release 24.09, the Triton Python gRPC client introduces support for gRPC error codes in streaming mode, enhancing error reporting capabilities. When this feature is enabled, the Triton server will return standard gRPC error codes and subsequently close the stream after delivering an error +gRPC guide on [status-codes](https://grpc.io/docs/guides/status-codes/) +This feature is optional can be enabled by adding header with `triton_grpc_error` key and `true` as value. + +```python + triton_client = grpcclient.InferenceServerClient(triton_server_url) + # New added header key value + metadata = {"triton_grpc_error": "true"} + triton_client.start_stream( + callback=partial(callback, user_data), headers=metadata + ) +``` ## Simple Example Applications This section describes several of the simple example applications and From b6a0918db6d5f23a65240333541c77d8fa185794 Mon Sep 17 00:00:00 2001 From: Indrajit Bhosale Date: Wed, 14 Aug 2024 11:53:03 -0700 Subject: [PATCH 2/4] Docs updated for GRPC Error codes --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2f89a2578..338864805 100644 --- a/README.md +++ b/README.md @@ -585,11 +585,14 @@ server side. If writing your own gRPC clients in the language of choice consult gRPC guide on [cancellation](https://grpc.io/docs/guides/cancellation/#cancelling-an-rpc-call-on-the-client-side). -### GRPC Error Status Codes +### GRPC Status Codes -Starting from release 24.09, the Triton Python gRPC client introduces support for gRPC error codes in streaming mode, enhancing error reporting capabilities. When this feature is enabled, the Triton server will return standard gRPC error codes and subsequently close the stream after delivering an error -gRPC guide on [status-codes](https://grpc.io/docs/guides/status-codes/) +Starting from release 24.09, Triton server introduces support for gRPC error codes in streaming mode for all clients enhancing error reporting capabilities. When this feature is enabled, the Triton server will return standard gRPC error codes and subsequently close the stream after delivering the error. This feature is optional can be enabled by adding header with `triton_grpc_error` key and `true` as value. +See [grpc error codes](https://github.com/triton-inference-server/server/tree/main#GRPC-Status-Codes) +in the server to learn about how this is handled on the server side. +See gRPC guide on [status-codes](https://grpc.io/docs/guides/status-codes/) for more details. +Below is a Python snippet to enable the feature. ```python triton_client = grpcclient.InferenceServerClient(triton_server_url) From 465112b7d503a326ca4109c27351cb754ed291e4 Mon Sep 17 00:00:00 2001 From: Indrajit Bhosale Date: Thu, 15 Aug 2024 10:07:12 -0700 Subject: [PATCH 3/4] Improve docs --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f7c77d67e..064c2a429 100644 --- a/README.md +++ b/README.md @@ -558,6 +558,7 @@ See [grpc error codes](https://github.com/triton-inference-server/server/tree/ma in the server to learn about how this is handled on the server side. See gRPC guide on [status-codes](https://grpc.io/docs/guides/status-codes/) for more details. Below is a Python snippet to enable the feature. +Without this header Triton server will continue streaming in default mode returning error message and status inside `InferenceServerException` object within the callback provided. ```python triton_client = grpcclient.InferenceServerClient(triton_server_url) From a4c913cd606063166b297bef2b8ff9340cb38ddc Mon Sep 17 00:00:00 2001 From: Indrajit Bhosale Date: Thu, 15 Aug 2024 15:21:05 -0700 Subject: [PATCH 4/4] Fix Readme.md text wrap --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 064c2a429..2c15237bf 100644 --- a/README.md +++ b/README.md @@ -552,13 +552,17 @@ gRPC guide on [cancellation](https://grpc.io/docs/guides/cancellation/#cancellin ### GRPC Status Codes -Starting from release 24.09, Triton server introduces support for gRPC error codes in streaming mode for all clients enhancing error reporting capabilities. When this feature is enabled, the Triton server will return standard gRPC error codes and subsequently close the stream after delivering the error. -This feature is optional can be enabled by adding header with `triton_grpc_error` key and `true` as value. -See [grpc error codes](https://github.com/triton-inference-server/server/tree/main#GRPC-Status-Codes) -in the server to learn about how this is handled on the server side. -See gRPC guide on [status-codes](https://grpc.io/docs/guides/status-codes/) for more details. -Below is a Python snippet to enable the feature. -Without this header Triton server will continue streaming in default mode returning error message and status inside `InferenceServerException` object within the callback provided. +Starting from release 24.08, Triton server introduces support for gRPC error +codes in streaming mode for all clients enhancing error reporting capabilities. When +this feature is enabled, the Triton server will return standard gRPC error codes +and subsequently close the stream after delivering the error. This feature is +optional can be enabled by adding header with `triton_grpc_error` key and `true` as +value. See [grpc error +codes](https://github.com/triton-inference-server/server/tree/main#GRPC-Status-Codes) in the server to learn about how this is handled on the server side. See gRPC +guide on [status-codes](https://grpc.io/docs/guides/status-codes/) for more details. +Below is a Python snippet to enable the feature. Without this header Triton server +will continue streaming in default mode returning error message and status inside +`InferenceServerException` object within the callback provided. ```python triton_client = grpcclient.InferenceServerClient(triton_server_url)