From f1eaff3c9790464bed3183ff76555cf815166f50 Mon Sep 17 00:00:00 2001 From: Diego Russo Date: Thu, 2 Feb 2023 22:04:05 +0000 Subject: MLIA-782 Remove --output parameter * Remove --output parameter from argument parser * Remove FormattedFilePath class and its presence across the codebase * Move logging module from cli to core * The output format is now injected in the execution context and used across MLIA * Depending on the output format, TextReporter and JSONReporter have been created and used accordingly. * The whole output to standard output and/or logfile is driven via the logging module: the only case where the print is used is when the --json parameter is specified. This is needed becase all output (including third party application as well) needs to be disabled otherwise it might corrupt the json output in the standard output. * Debug information is logged into the log file and printed to stdout when the output format is plain_text. * Update E2E test and config to cope with the new mechanism of outputting json data to standard output. Change-Id: I4395800b0b1af4d24406a828d780bdeef98cd413 --- src/mlia/target/cortex_a/handlers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/mlia/target/cortex_a/handlers.py') diff --git a/src/mlia/target/cortex_a/handlers.py b/src/mlia/target/cortex_a/handlers.py index d6acde5..1a74da7 100644 --- a/src/mlia/target/cortex_a/handlers.py +++ b/src/mlia/target/cortex_a/handlers.py @@ -5,7 +5,6 @@ from __future__ import annotations import logging -from mlia.core.common import FormattedFilePath from mlia.core.events import CollectedDataEvent from mlia.core.handlers import WorkflowEventsHandler from mlia.nn.tensorflow.tflite_compat import TFLiteCompatibilityInfo @@ -20,9 +19,9 @@ logger = logging.getLogger(__name__) class CortexAEventHandler(WorkflowEventsHandler, CortexAAdvisorEventHandler): """CLI event handler.""" - def __init__(self, output: FormattedFilePath | None = None) -> None: + def __init__(self) -> None: """Init event handler.""" - super().__init__(cortex_a_formatters, output) + super().__init__(cortex_a_formatters) def on_collected_data(self, event: CollectedDataEvent) -> None: """Handle CollectedDataEvent event.""" -- cgit v1.2.1