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

Docs for GRPC Error codes #775

Merged
merged 6 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,28 @@ 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 Status Codes

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)
# 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
Expand Down
Loading