nicetoolbox.evaluation.metrics.base_metric.MetricFactory¶
- class nicetoolbox.evaluation.metrics.base_metric.MetricFactory[source]¶
Bases:
objectStatic class that instantiates metric handlers based on the evaluation config.
Methods
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]