-
Notifications
You must be signed in to change notification settings - Fork 170
feat: Add parameters support to InferResponse #394
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
db84765
Add parameters support to InferResponse
kthui 816d4ac
Add documentation
kthui f231147
Mark response parameters accessor const and JSON serializable
kthui 47e71e0
[Docs] Note BLS response parameters are not populated currently
kthui 1acb956
[comment] Clarify why PbTensor::LoadFromSharedMemory() requires holdi…
kthui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<!-- | ||
# Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# Copyright 2020-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
|
@@ -54,6 +54,7 @@ any C++ code. | |
- [`finalize`](#finalize) | ||
- [Model Config File](#model-config-file) | ||
- [Inference Request Parameters](#inference-request-parameters) | ||
- [Inference Response Parameters](#inference-response-parameters) | ||
- [Managing Python Runtime and Libraries](#managing-python-runtime-and-libraries) | ||
- [Building Custom Python Backend Stub](#building-custom-python-backend-stub) | ||
- [Creating Custom Execution Environments](#creating-custom-execution-environments) | ||
|
@@ -787,6 +788,24 @@ You can read more about the inference request parameters in the [parameters | |
extension](https://github.com/triton-inference-server/server/blob/main/docs/protocol/extension_parameters.md) | ||
documentation. | ||
|
||
## Inference Response Parameters | ||
|
||
Inference response parameters may be optionally set during the construction of | ||
an inference response object. The parameters should be a dictionary of key value | ||
pairs, where keys are `str` and values are `bool`, `int` or `str`. For example, | ||
```python | ||
response = pb_utils.InferenceResponse( | ||
output_tensors, parameters={"key": "value"} | ||
) | ||
``` | ||
|
||
You can read more about the inference response parameters in the [parameters | ||
extension](https://github.com/triton-inference-server/server/blob/main/docs/protocol/extension_parameters.md) | ||
documentation. | ||
|
||
Inference response parameters is currently not supported on BLS inference | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure this is clear .... |
||
responses received by BLS models. | ||
|
||
## Managing Python Runtime and Libraries | ||
|
||
Python backend shipped in the [NVIDIA GPU Cloud](https://ngc.nvidia.com/) | ||
|
kthui marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.