nicetoolbox.evaluation.metrics.base_metric.MetricFactory

class nicetoolbox.evaluation.metrics.base_metric.MetricFactory[source]

Bases: object

Static class that instantiates metric handlers based on the evaluation config.

Methods

create_all

Create all metric handlers based on the evaluation configuration.

static create_all(ev_cfg: FinalEvaluationConfig, device: str) List[MetricHandler][source]

Create all metric handlers based on the evaluation configuration.

Parameters:
  • ev_cfg (EvaluationConfig) – The evaluation config listing metric types.

  • device (str) – The device to run the metrics on (e.g., ‘cpu’ or ‘cuda’).

Returns:

A list of metric handlers with instantiated metrics.

Return type:

List[MetricHandler]