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

fix: Fix bug when targeting the TRT-LLM backend ensemble #7700

Merged
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
3 changes: 3 additions & 0 deletions python/openai/openai_frontend/engine/triton_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 backend == "":
# look for ensemble setting if backend is undefined
blongnv marked this conversation as resolved.
Show resolved Hide resolved
backend = model.config()["platform"]
Copy link
Contributor

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

Copy link
Contributor

@rmccorm4 rmccorm4 Oct 15, 2024

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.

Copy link
Contributor

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"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented, please check

print(f"Found model: {name=}, {backend=}")

metadata = TritonModelMetadata(
Expand Down