From 68aa75fec0cdbd952d560be9ab5294e848758887 Mon Sep 17 00:00:00 2001 From: braf Date: Tue, 20 Feb 2024 14:50:40 +0000 Subject: [PATCH] Adding in grpc code --- model_analyzer/triton/client/grpc_client.py | 6 ++++++ model_analyzer/triton/client/http_client.py | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/model_analyzer/triton/client/grpc_client.py b/model_analyzer/triton/client/grpc_client.py index 9b9411026..5b18fe853 100755 --- a/model_analyzer/triton/client/grpc_client.py +++ b/model_analyzer/triton/client/grpc_client.py @@ -84,3 +84,9 @@ def get_model_repository_index(self): Returns the JSON dict holding the model repository index. """ return self._client.get_model_repository_index(as_json=True)["models"] + + def is_model_ready(self, model_name: str) -> bool: + """ + Returns true if the model is loaded on the server + """ + return self._client.is_model_ready(model_name) diff --git a/model_analyzer/triton/client/http_client.py b/model_analyzer/triton/client/http_client.py index 758e82bce..eb806332c 100755 --- a/model_analyzer/triton/client/http_client.py +++ b/model_analyzer/triton/client/http_client.py @@ -104,6 +104,4 @@ def is_model_ready(self, model_name: str) -> bool: """ Returns true if the model is loaded on the server """ - foo = self._client.is_model_ready(model_name) - - return foo + return self._client.is_model_ready(model_name)