[fix] fix custom input and output formatting #1728
Merged
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.
Description
Two fixes related to providing custom input/output formatters. While not a fully supported use-case, there are currently users relying on this behavior that we need to maintain support for.
custom input formatting for tensorrtllm handlers. Users of previous versions rely on overriding
parse_input
method of the Service object. the static parse_input method no longer works for overriding, so i've madeself.parse_input
accessible again so that users can override this default implementation the same way they do in previous releases.custom output formatting by providing
option.output_formatter
no longer works. We probably missed this when making the changes to per request output_formatter. This also adds back that logic