Skip to main content
Version: Next

metric_helper

MetricHelperInterface Objects

class MetricHelperInterface(ABC)

MetricHelperInterface The MetricHelperInterface is used to log and retrieve metrics

log

@abstractmethod
def log(name: str, metrics: dict) -> None

Log a metric

Arguments:


  • name str - Name of the metric
  • metrics dict - The value of the metric as a dictionary

get_metrics

@abstractmethod
def get_metrics() -> list[tuple[str, dict]]

Get all metrics Will only return metrics from this instance, will not persist between steps.

Returns

list[tuple[str, dict]]: The metrics as a list of tuples with the name and the value of the metric