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

Add docs for error code #300

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,21 @@ class TritonPythonModel:
return responses
```

Starting from 23.09, `pb_utils.TritonError` may be constructed with an optional
Triton error code on the second parameter. For example:

```
kthui marked this conversation as resolved.
Show resolved Hide resolved
pb_utils.TritonError("The file is not found", pb_utils.TritonError.NOT_FOUND)
```

Supported error codes:
kthui marked this conversation as resolved.
Show resolved Hide resolved
kthui marked this conversation as resolved.
Show resolved Hide resolved
* `pb_utils.TritonError.UNKNOWN`
* `pb_utils.TritonError.INTERNAL`
* `pb_utils.TritonError.NOT_FOUND`
* `pb_utils.TritonError.INVALID_ARG`
* `pb_utils.TritonError.UNAVAILABLE`
* `pb_utils.TritonError.UNSUPPORTED`
* `pb_utils.TritonError.ALREADY_EXISTS`

#### Decoupled mode

Expand Down