@@ -126,7 +126,9 @@ def get_server_handle(config, gpus, use_model_repository=False):
126126 """
127127
128128 if config .triton_launch_mode == "remote" :
129- server = TritonServerFactory ._get_remote_server_handle (config )
129+ server = TritonServerFactory ._get_remote_server_handle (
130+ config , print_warning_message = use_model_repository
131+ )
130132 elif config .triton_launch_mode == "local" :
131133 server = TritonServerFactory ._get_local_server_handle (
132134 config , gpus , use_model_repository = True
@@ -147,22 +149,23 @@ def get_server_handle(config, gpus, use_model_repository=False):
147149 return server
148150
149151 @staticmethod
150- def _get_remote_server_handle (config ):
152+ def _get_remote_server_handle (config , print_warning_message = True ):
151153 triton_config = TritonServerConfig ()
152154 triton_config .update_config (config .triton_server_flags )
153155 triton_config ["model-repository" ] = "remote-model-repository"
154156 logger .info ("Using remote Triton Server" )
155157 server = TritonServerFactory .create_server_local (
156158 path = None , config = triton_config , gpus = [], log_path = ""
157159 )
158- logger .warning (
159- "GPU memory metrics reported in the remote mode are not"
160- " accurate. Model Analyzer uses Triton explicit model control to"
161- " load/unload models. Some frameworks do not release the GPU"
162- " memory even when the memory is not being used. Consider"
163- ' using the "local" or "docker" mode if you want to accurately'
164- " monitor the GPU memory usage for different models."
165- )
160+ if print_warning_message :
161+ logger .warning (
162+ "GPU memory metrics reported in the remote mode are not"
163+ " accurate. Model Analyzer uses Triton explicit model control to"
164+ " load/unload models. Some frameworks do not release the GPU"
165+ " memory even when the memory is not being used. Consider"
166+ ' using the "local" or "docker" mode if you want to accurately'
167+ " monitor the GPU memory usage for different models."
168+ )
166169
167170 return server
168171
0 commit comments