Fix version enabled endpoints on Triton engine were not called

This commit is contained in:
allegroai 2024-02-26 11:27:12 +02:00
parent 4ac13d5287
commit f2ba37c8d4
2 changed files with 6 additions and 1 deletions

View File

@ -351,7 +351,12 @@ class TritonPreprocessRequest(BasePreprocessRequest):
# Generate the request
request = self._ext_service_pb2.ModelInferRequest()
request.model_name = "{}/{}".format(self.model_endpoint.serving_url, self.model_endpoint.version).strip("/")
if self.model_endpoint.version:
request.model_name = "{}_{}".format(
self.model_endpoint.serving_url, self.model_endpoint.version).strip("/")
else:
request.model_name = str(self.model_endpoint.serving_url).strip("/")
# we do not use the Triton model versions, we just assume a single version per endpoint
request.model_version = "1"

BIN
examples/pytorch/5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B