Skip to content

Commit 44707fc

Browse files
authored
Revert "Create detailed reports after profile (#691)" (#706)
This reverts commit b30e061.
1 parent 43a1d1b commit 44707fc

File tree

8 files changed

+22
-59
lines changed

8 files changed

+22
-59
lines changed

docs/config.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,6 @@ cpu_only_composing_models: <comma-delimited-string-list>
230230
# Skips the generation of summary reports and tables
231231
[ skip_summary_reports: <bool> | default: false]
232232
233-
# Skips the generation of detailed reports and tables
234-
[ skip_detailed_reports: <bool> | default: false]
235-
236233
# Number of top configs to show in summary plots
237234
[ num_configs_per_model: <int> | default: 3]
238235

docs/report.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ $ model-analyzer profile --profile-models <list of model names> --checkpoint-dir
3333
The export directory will, by default, contain 3 subdirectories. The summary
3434
report for a model will be located in `[export-path]/reports/summaries/<model name>`. The report will look like the one shown [_here_](../examples/online_summary.pdf).
3535

36-
To disable summary report generation use `--skip-summary-reports` or set the
37-
`skip_summary_reports` yaml option to `false`.
36+
To disable summary report generation use `--summarize=false` or set the
37+
`summarize` yaml option to `false`.
3838

3939
## Detailed Reports
4040

@@ -57,7 +57,3 @@ look like the one shown [_here_](../examples/online_detailed_report.pdf).
5757
See the [**configuring model
5858
analyzer**](./config.md) section for more details on how to configure these
5959
reports.
60-
61-
Detailed reports for the top-N (based on the value of `--num-configs-per-model`) configurations are also generated at the end of `profile`.
62-
To disable detailed report generation after `profile` use `--skip-detailed-reports` or set the
63-
`skip_detailed_reports` yaml option to `false`.

model_analyzer/analyzer.py

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
from typing import List, Union, Optional
16-
import os, sys
16+
import sys
1717
from model_analyzer.constants import LOGGER_NAME, PA_ERROR_LOG_FILENAME
1818
from .model_manager import ModelManager
1919
from .result.result_manager import ResultManager
@@ -126,9 +126,17 @@ def profile(self, client: TritonClient, gpus: List[GPUDevice], mode: str,
126126
if not self._config.skip_summary_reports:
127127
self._create_summary_tables(verbose)
128128
self._create_summary_reports(mode)
129-
self._create_detailed_reports()
130129

131-
self._check_for_perf_analyzer_errors()
130+
# TODO-TMA-650: Detailed reporting not supported for multi-model
131+
if not self._config.run_config_profile_models_concurrently_enable:
132+
for model in self._config.profile_models:
133+
logger.info(
134+
self._get_report_command_help_string(
135+
model.model_name()))
136+
137+
if self._metrics_manager.encountered_perf_analyzer_error():
138+
logger.warning(f"Perf Analyzer encountered an error when profiling one or more configurations. " \
139+
f"See {self._config.export_path}/{PA_ERROR_LOG_FILENAME} for further details.\n")
132140

133141
def report(self, mode: str) -> None:
134142
"""
@@ -272,28 +280,18 @@ def _get_num_profiled_configs(self):
272280
])
273281

274282
def _get_report_command_help_string(self, model_name: str) -> str:
275-
top_n_model_config_names = self._get_top_n_model_config_names(
276-
n=self._config.num_configs_per_model, model_name=model_name)
283+
top_3_model_config_names = self._get_top_n_model_config_names(
284+
n=3, model_name=model_name)
277285
return (
278286
f'To generate detailed reports for the '
279-
f'{len(top_n_model_config_names)} best {model_name} configurations, run '
280-
f'`{self._get_report_command_string(top_n_model_config_names)}`')
281-
282-
def _run_report_command(self, model_name: str) -> None:
283-
top_n_model_config_names = self._get_top_n_model_config_names(
284-
n=self._config.num_configs_per_model, model_name=model_name)
285-
top_n_string = ','.join(top_n_model_config_names)
286-
logger.info(
287-
f'Generating detailed reports for the best configurations {top_n_string}:'
288-
)
289-
os.system(
290-
f'{self._get_report_command_string(top_n_model_config_names)}')
287+
f'{len(top_3_model_config_names)} best {model_name} configurations, run '
288+
f'`{self._get_report_command_string(top_3_model_config_names)}`')
291289

292290
def _get_report_command_string(self,
293-
top_n_model_config_names: List[str]) -> str:
291+
top_3_model_config_names: List[str]) -> str:
294292
report_command_string = (f'model-analyzer report '
295293
f'--report-model-configs '
296-
f'{",".join(top_n_model_config_names)}')
294+
f'{",".join(top_3_model_config_names)}')
297295

298296
if self._config.export_path is not None:
299297
report_command_string += (f' --export-path '
@@ -338,19 +336,3 @@ def _multiple_models_in_report_model_config(self) -> bool:
338336
]
339337

340338
return len(set(model_names)) > 1
341-
342-
def _check_for_perf_analyzer_errors(self) -> None:
343-
if self._metrics_manager.encountered_perf_analyzer_error():
344-
logger.warning(f"Perf Analyzer encountered an error when profiling one or more configurations. " \
345-
f"See {self._config.export_path}/{PA_ERROR_LOG_FILENAME} for further details.\n")
346-
347-
def _create_detailed_reports(self) -> None:
348-
# TODO-TMA-650: Detailed reporting not supported for multi-model
349-
if not self._config.run_config_profile_models_concurrently_enable:
350-
for model in self._config.profile_models:
351-
if not self._config.skip_detailed_reports:
352-
self._run_report_command(model.model_name())
353-
else:
354-
logger.info(
355-
self._get_report_command_help_string(
356-
model.model_name()))

model_analyzer/config/input/config_command_profile.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
DEFAULT_FILENAME_SERVER_ONLY, DEFAULT_NUM_CONFIGS_PER_MODEL, DEFAULT_NUM_TOP_MODEL_CONFIGS, \
4747
DEFAULT_INFERENCE_OUTPUT_FIELDS, DEFAULT_REQUEST_RATE_INFERENCE_OUTPUT_FIELDS, \
4848
DEFAULT_GPU_OUTPUT_FIELDS, DEFAULT_REQUEST_RATE_GPU_OUTPUT_FIELDS, DEFAULT_SERVER_OUTPUT_FIELDS, \
49-
DEFAULT_ONLINE_OBJECTIVES, DEFAULT_ONLINE_PLOTS, DEFAULT_OFFLINE_PLOTS, DEFAULT_MODEL_WEIGHTING, \
50-
DEFAULT_SKIP_DETAILED_REPORTS
49+
DEFAULT_ONLINE_OBJECTIVES, DEFAULT_ONLINE_PLOTS, DEFAULT_OFFLINE_PLOTS, DEFAULT_MODEL_WEIGHTING
5150

5251
from model_analyzer.constants import LOGGER_NAME
5352
from model_analyzer.triton.server.server_config import \
@@ -224,15 +223,6 @@ def _fill_config(self):
224223
default_value=DEFAULT_SKIP_SUMMARY_REPORTS,
225224
description=
226225
'Skips the generation of analysis summary reports and tables.'))
227-
self._add_config(
228-
ConfigField(
229-
'skip_detailed_reports',
230-
flags=['--skip-detailed-reports'],
231-
field_type=ConfigPrimitive(bool),
232-
parser_args={'action': 'store_true'},
233-
default_value=DEFAULT_SKIP_DETAILED_REPORTS,
234-
description=
235-
"Skips the generation of detailed summary reports and tables."))
236226

237227
self._add_repository_configs()
238228
self._add_client_configs()

model_analyzer/config/input/config_defaults.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
DEFAULT_LOG_LEVEL = 'INFO'
3434
DEFAULT_GPUS = 'all'
3535
DEFAULT_SKIP_SUMMARY_REPORTS = False
36-
DEFAULT_SKIP_DETAILED_REPORTS = False
3736
DEFAULT_OUTPUT_MODEL_REPOSITORY = os.path.join(os.getcwd(),
3837
'output_model_repository')
3938
DEFAULT_OVERRIDE_OUTPUT_REPOSITORY_FLAG = False

qa/L0_profile/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ MODEL_ANALYZER_ARGS="$MODEL_ANALYZER_ARGS --triton-metrics-url http://localhost:
5454
MODEL_ANALYZER_ARGS="$MODEL_ANALYZER_ARGS --output-model-repository-path $OUTPUT_MODEL_REPOSITORY --override-output-model-repository"
5555
MODEL_ANALYZER_ARGS="$MODEL_ANALYZER_ARGS -e $EXPORT_PATH --filename-server-only=$FILENAME_SERVER_ONLY"
5656
MODEL_ANALYZER_ARGS="$MODEL_ANALYZER_ARGS --filename-model-inference=$FILENAME_INFERENCE_MODEL --filename-model-gpu=$FILENAME_GPU_MODEL"
57+
MODEL_ANALYZER_ARGS="$MODEL_ANALYZER_ARGS --skip-summary-reports"
5758
MODEL_ANALYZER_SUBCOMMAND="profile"
5859
run_analyzer
5960
if [ $? -ne 0 ]; then

tests/test_analyzer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ def mock_get_list_of_models(self):
6464
_create_metrics_manager=MagicMock(),
6565
_create_model_manager=MagicMock(),
6666
_get_server_only_metrics=MagicMock(),
67-
_profile_models=MagicMock(),
68-
_check_for_perf_analyzer_errors=MagicMock())
67+
_profile_models=MagicMock())
6968
def test_profile_skip_summary_reports(self, **mocks):
7069
"""
7170
Tests when the skip_summary_reports config option is turned on,

tests/test_cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def get_test_options():
6767
OptionStruct("bool", "profile","--reload-model-disable"),
6868
OptionStruct("bool", "profile","--early-exit-enable"),
6969
OptionStruct("bool", "profile","--skip-summary-reports"),
70-
OptionStruct("bool", "profile","--skip-detailed-reports"),
7170
#Int/Float options
7271
# Options format:
7372
# (int/float, MA step, long_option, short_option, test_value, expected_default_value)

0 commit comments

Comments
 (0)