-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix: Fix bug when targeting the TRT-LLM backend ensemble #7700
fix: Fix bug when targeting the TRT-LLM backend ensemble #7700
Conversation
ref: DLIS-7451 to follow-up with a test for |
Co-authored-by: Ryan McCormick <[email protected]>
Pipeline: 19345468 ✅ |
@@ -250,6 +250,9 @@ def _get_model_metadata(self) -> Dict[str, TritonModelMetadata]: | |||
for name, _ in self.server.models().keys(): | |||
model = self.server.model(name) | |||
backend = model.config()["backend"] | |||
if not backend: | |||
# Check platform field as a backup, this will support 'ensemble' models | |||
backend = model.config()["platform"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmccorm4 should we check against a list of supported platform types here to rule out any accidents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can be strict here just in case.
There's currently no use case I'm aware of where the platform would be used to specify a backend (ex: platform: tensorrt_plan
) that doesn't have a backend equivalent (other than ensemble
), and we generally encourage use of backend for this purpose for pretty much everything other than ensembles - so I think it's fine to be strict for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blongnv could you modify it to be something like this?
# Explicitly handle ensembles to avoid any runtime validation errors
if not backend and model.config()["platform"] == "ensemble":
backend = "ensemble"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented, please check
What does the PR do?
If a user follows the example code and tries to use the
ensemble
instead oftensorrt_llm_bls
, they will get this error:After the PR fix, the response will be correct:
Checklist
Agreement
<commit_type>: <Title>
pre-commit install, pre-commit run --all
)Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
Where should the reviewer start?
Test plan:
Caveats:
Background
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)