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

Check TensorRT error message more granularly #5719

Merged
merged 3 commits into from
May 1, 2023
Merged
Changes from all commits
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
17 changes: 11 additions & 6 deletions qa/L0_trt_error_propagation/trt_error_propagation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,17 @@ def test_invalid_trt_model(self):
with self.assertRaises(InferenceServerException) as cm:
self.__triton.load_model("invalid_plan_file")
err_msg = str(cm.exception)
self.assertIn("Internal: unable to create TensorRT engine", err_msg,
"Caught an unexpected exception")
self.assertIn(
"Error Code 4: Internal Error (Engine deserialization failed.)",
err_msg,
"Detailed error message not propagated back to triton client")
# All 'expected_msg_parts' should be present in the 'err_msg' in order
expected_msg_parts = [
"load failed for model", "version 1 is at UNAVAILABLE state: ",
"Internal: unable to create TensorRT engine: ", "Error Code ",
"Internal Error "
]
for expected_msg_part in expected_msg_parts:
self.assertIn(
expected_msg_part, err_msg,
"Cannot find an expected part of error message")
_, err_msg = err_msg.split(expected_msg_part)

def test_invalid_trt_model_autocomplete(self):
with self.assertRaises(InferenceServerException) as cm:
Expand Down