Skip to content

Commit 6f58032

Browse files
authored
Fix incorrect remote mode warnings (#828)
* Fix/Remove incorrect remote mode warnings. * Adding in grpc code
1 parent 2607a5d commit 6f58032

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

model_analyzer/analyzer.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,13 @@ def _warn_if_other_models_loaded_on_remote_server(self, client):
403403
repository_index = client.get_model_repository_index()
404404
profile_model_names = [pm.model_name() for pm in self._config.profile_models]
405405

406-
for model in repository_index:
407-
if model["name"] not in profile_model_names:
408-
model_name = model["name"]
406+
model_names_loaded_on_server = []
407+
for repository_item in repository_index:
408+
if client.is_model_ready(repository_item["name"]):
409+
model_names_loaded_on_server.append(repository_item["name"])
410+
411+
for model_name in model_names_loaded_on_server:
412+
if model_name not in profile_model_names:
409413
logger.warning(
410414
f"A model not being profiled ({model_name}) is loaded on the remote Tritonserver. "
411415
"This could impact the profile results."

model_analyzer/triton/client/grpc_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,9 @@ def get_model_repository_index(self):
8484
Returns the JSON dict holding the model repository index.
8585
"""
8686
return self._client.get_model_repository_index(as_json=True)["models"]
87+
88+
def is_model_ready(self, model_name: str) -> bool:
89+
"""
90+
Returns true if the model is loaded on the server
91+
"""
92+
return self._client.is_model_ready(model_name)

model_analyzer/triton/client/http_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,9 @@ def get_model_repository_index(self):
9999
Returns the JSON dict holding the model repository index.
100100
"""
101101
return self._client.get_model_repository_index()
102+
103+
def is_model_ready(self, model_name: str) -> bool:
104+
"""
105+
Returns true if the model is loaded on the server
106+
"""
107+
return self._client.is_model_ready(model_name)

model_analyzer/triton/server/server_factory.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,6 @@ def _get_remote_server_handle(config):
163163
' using the "local" or "docker" mode if you want to accurately'
164164
" monitor the GPU memory usage for different models."
165165
)
166-
logger.warning(
167-
'Config sweep parameters are ignored in the "remote" mode because'
168-
" Model Analyzer does not have access to the model repository of"
169-
" the remote Triton Server."
170-
)
171166

172167
return server
173168

0 commit comments

Comments
 (0)