Skip to content

general_application_report

qoa4ml.reports.general_application_report

Classes

GeneralApplicationReport

GeneralApplicationReport manages the reporting of application metrics and inference data.

Parameters:

Name Type Description Default
client_config
ClientInfo

Configuration settings related to the client.

required

Attributes:

Name Type Description
client_config ClientInfo

A deep copy of the client configuration.

init_time float

The initialization time of the report.

report GeneralApplicationReportModel

The current state of the report.

execution_instance MicroserviceInstance

An instance representing the current execution context.

previous_reports list[MicroserviceInstance]

A list of previous execution instances.

Methods:

Name Description
reset

Reset the report to an initial state.

process_previous_report

Process and incorporate a previous report.

observe_metric

Observe and record a metric.

observe_inference

Observe and record inference data.

observe_inference_metric

Observe and record an inference-specific metric.

Functions
__init__(client_config)

Initialize an instance of GeneralApplicationReport.

Parameters:

Name Type Description Default
client_config ClientInfo

Configuration settings related to the client.

required
observe_inference(inference_value)

Observe and record inference data.

Parameters:

Name Type Description Default
inference_value Any

The value of the inference to be recorded.

required
Notes
  • This method records inference values as a metric with the name "Inference" and report type ml_specific.
observe_inference_metric(metric)

Observe and record an inference-specific metric.

Parameters:

Name Type Description Default
metric Metric

The inference-specific metric to be recorded.

required
observe_metric(report_type, stage, metric)

Observe and record a metric.

Parameters:

Name Type Description Default
report_type ReportTypeEnum

The type of report being generated.

required
stage str

The stage of the process in which the metric is recorded.

required
metric Metric

The metric to be recorded.

required
process_previous_report(previous_report_dict)

Process and incorporate a previous report.

Parameters:

Name Type Description Default
previous_report_dict dict

Dictionary representation of a previous report.

required
Notes
  • This method assumes the last metric in the previous report was observed by the previous instance.
  • It appends the metrics from the previous report to the current report.
reset()

Reset the report to an initial state.

Notes
  • This method initializes a new report model and sets up the execution instance and previous reports list.