Skip to content

Commit

Permalink
Fix/Remove incorrect remote mode warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-braf committed Feb 20, 2024
1 parent d800c93 commit ee06d39
Show file tree
Hide file tree
Showing 3 changed files with 15 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
8 changes: 8 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,11 @@ 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
"""
foo = self._client.is_model_ready(model_name)

return foo
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 ee06d39

Please sign in to comment.