Skip to content

Commit

Permalink
Fix incorrect remote mode warnings (#828)
Browse files Browse the repository at this point in the history
* Fix/Remove incorrect remote mode warnings.

* Adding in grpc code
  • Loading branch information
nv-braf authored Feb 20, 2024
1 parent 2607a5d commit 6f58032
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
10 changes: 7 additions & 3 deletions model_analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,13 @@ def _warn_if_other_models_loaded_on_remote_server(self, client):
repository_index = client.get_model_repository_index()
profile_model_names = [pm.model_name() for pm in self._config.profile_models]

for model in repository_index:
if model["name"] not in profile_model_names:
model_name = model["name"]
model_names_loaded_on_server = []
for repository_item in repository_index:
if client.is_model_ready(repository_item["name"]):
model_names_loaded_on_server.append(repository_item["name"])

for model_name in model_names_loaded_on_server:
if model_name not in profile_model_names:
logger.warning(
f"A model not being profiled ({model_name}) is loaded on the remote Tritonserver. "
"This could impact the profile results."
Expand Down
6 changes: 6 additions & 0 deletions model_analyzer/triton/client/grpc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 6 additions & 0 deletions model_analyzer/triton/client/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,9 @@ def get_model_repository_index(self):
Returns the JSON dict holding the model repository index.
"""
return self._client.get_model_repository_index()

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)
5 changes: 0 additions & 5 deletions model_analyzer/triton/server/server_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ def _get_remote_server_handle(config):
' using the "local" or "docker" mode if you want to accurately'
" monitor the GPU memory usage for different models."
)
logger.warning(
'Config sweep parameters are ignored in the "remote" mode because'
" Model Analyzer does not have access to the model repository of"
" the remote Triton Server."
)

return server

Expand Down

0 comments on commit 6f58032

Please sign in to comment.