Skip to content

frameworks.ultralytics.services.model.logger.base

base

Classes:

Name Description
UltralyticsBaseMetricMapping

A base class that defines the standard metric mappings for Ultralytics models.

UltralyticsBaseMetricMapping()

Bases: MetricMapping

A base class that defines the standard metric mappings for Ultralytics models.

This class extends the MetricMapping to register common metrics used during training and validation in the Ultralytics framework. It provides a consistent mapping between framework-specific metric names and their standardized names across training phases.

Methods:

Name Description
add_metric

Add a metric to the specified phase.

get_mapping

Get mapping of framework names to standard names for a given phase.

Attributes:

Name Type Description
mappings dict[str, list[Metric]]

mappings = {'train': [], 'val': [], 'test': []} instance-attribute

add_metric(phase, metric)

Add a metric to the specified phase.

Parameters:

Name Type Description Default
phase
str

One of 'train', 'val', or 'test'.

required
metric
Metric

The metric to register.

required

get_mapping(phase=None)

Get mapping of framework names to standard names for a given phase.

Parameters:

Name Type Description Default
phase
str | None

One of 'train', 'val', 'test'.

None

Returns:

Name Type Description
dict dict[str, str]

Mapping of metric names.