From dba04df561e7de478986d553f3f601076438747a Mon Sep 17 00:00:00 2001 From: Benjamin Klimczak Date: Mon, 21 Nov 2022 12:20:54 +0000 Subject: Improve the CLI output Resolves: MLIA-719, MLIA-720 Change-Id: Ib697046f5090260437f3b1ab5fe8c5b4975abae2 --- src/mlia/cli/main.py | 2 +- src/mlia/devices/cortexa/advice_generation.py | 8 +++++--- tests/test_cli_main.py | 2 +- tests/test_devices_cortexa_advice_generation.py | 8 +++++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/mlia/cli/main.py b/src/mlia/cli/main.py index 6c74a11..33a44e1 100644 --- a/src/mlia/cli/main.py +++ b/src/mlia/cli/main.py @@ -236,7 +236,7 @@ def run_command(args: argparse.Namespace) -> int: f"Please check the log files in the {ctx.logs_path} for more details" ) if not ctx.verbose: - err_advice_message += ", or enable verbose mode" + err_advice_message += ", or enable verbose mode (--verbose)" logger.error(err_advice_message) diff --git a/src/mlia/devices/cortexa/advice_generation.py b/src/mlia/devices/cortexa/advice_generation.py index 3d2f106..bab9530 100644 --- a/src/mlia/devices/cortexa/advice_generation.py +++ b/src/mlia/devices/cortexa/advice_generation.py @@ -97,7 +97,8 @@ class CortexAAdviceProducer(FactBasedAdviceProducer): "Using select TensorFlow operators in TensorFlow Lite model " "requires special initialization of TFLiteConverter and " "TensorFlow Lite run-time.", - "Please refer to the TensorFlow documentation for more details.", + "Please refer to the TensorFlow documentation for more " + "details: https://www.tensorflow.org/lite/guide/ops_select", "Note, such models are not supported by the ML Inference Advisor.", ] ) @@ -105,13 +106,14 @@ class CortexAAdviceProducer(FactBasedAdviceProducer): if data_item.custom_ops: self.add_advice( [ - "The following operators appears to be custom and not natively " + "The following operators appear to be custom and not natively " "supported by TensorFlow Lite: " f"{', '.join(data_item.custom_ops)}.", "Using custom operators in TensorFlow Lite model " "requires special initialization of TFLiteConverter and " "TensorFlow Lite run-time.", - "Please refer to the TensorFlow documentation for more details.", + "Please refer to the TensorFlow documentation for more " + "details: https://www.tensorflow.org/lite/guide/ops_custom", "Note, such models are not supported by the ML Inference Advisor.", ] ) diff --git a/tests/test_cli_main.py b/tests/test_cli_main.py index d0f7152..5f6beb6 100644 --- a/tests/test_cli_main.py +++ b/tests/test_cli_main.py @@ -350,7 +350,7 @@ def test_commands_execution_backend_main( [ "Execution finished with error: Error", f"Please check the log files in the {Path.cwd()/'mlia_output/logs'} " - "for more details, or enable verbose mode", + "for more details, or enable verbose mode (--verbose)", ], ], [ diff --git a/tests/test_devices_cortexa_advice_generation.py b/tests/test_devices_cortexa_advice_generation.py index 4e6d892..fd669d4 100644 --- a/tests/test_devices_cortexa_advice_generation.py +++ b/tests/test_devices_cortexa_advice_generation.py @@ -116,20 +116,22 @@ BACKEND_INFO = ( "requires special initialization of TFLiteConverter and " "TensorFlow Lite run-time.", "Please refer to the TensorFlow documentation for " - "more details.", + "more details: " + "https://www.tensorflow.org/lite/guide/ops_select", "Note, such models are not supported by " "the ML Inference Advisor.", ] ), Advice( [ - "The following operators appears to be custom and not natively " + "The following operators appear to be custom and not natively " "supported by TensorFlow Lite: custom_op1, custom_op2.", "Using custom operators in TensorFlow Lite model " "requires special initialization of TFLiteConverter and " "TensorFlow Lite run-time.", "Please refer to the TensorFlow documentation for " - "more details.", + "more details: " + "https://www.tensorflow.org/lite/guide/ops_custom", "Note, such models are not supported by " "the ML Inference Advisor.", ] -- cgit v1.2.1