intelligence.acuirt.utils.report_exporter
ExporterProtocol Objects
class ExporterProtocol(Protocol)
Protocol for exporting workflow reports.
export
def export(report: AcuiRTWorkFlowReport, model: nn.Module,
export_path: str) -> None
Export the workflow report to a specified path.
format_timedelta_auto_unit
def format_timedelta_auto_unit(td_ns: np.timedelta64) -> str
Convert np.timedelta64 to a human-readable string with appropriate time unit.
Arguments:
td_nsnp.timedelta64 - Time duration in nanoseconds.
Returns:
str- Formatted time duration string with appropriate unit.
LoggingExporter Objects
class LoggingExporter(ExporterProtocol)
Export reports to logs.
__init__
def __init__(logger: AcuiRTDefaultLogger,
accuracy_key: str,
color_system="truecolor")
Initialize LoggingExporter.
Arguments:
loggerAcuiRTDefaultLogger - Logger to use for exporting reports.accuracy_keystr - Key to extract accuracy from the performance report.color_systemstr, optional - Color system for rich console. Defaults to "truecolor". It is recommended to set None if outputs are redirected to a file.
export
def export(report: AcuiRTWorkFlowReport, model: nn.Module,
export_path) -> None
Export workflow report to logs.
Arguments:
reportAcuiRTWorkFlowReport - Workflow report to export.modelnn.Module - Model used for conversion.export_path- Unused parameter for protocol compatibility.
FileExporter Objects
class FileExporter(ExporterProtocol)
Exporter that saves the report as files.
export
def export(report: AcuiRTWorkFlowReport, model: nn.Module,
export_path: str) -> None
Export the workflow report as files. following files will be created in the export_path:
- trace.json: Chrome trace file for profiling information.
- conversion_report.json: JSON file containing conversion report. (for debugging and skip conversion in next runs)
- workflow_report.json: JSON file containing the entire workflow report.
- statistics.csv: CSV file containing the statistics of conversion results and performance.
Arguments:
reportAcuiRTWorkFlowReport - Workflow report to export.modelnn.Module - Model used for the workflow.export_pathstr - Path to export the report.]