Skip to content

Experiments

Metric

Bases: Protocol

id property

The globally unique identifier of the metric.

Returns:

Name Type Description
UUID UUID

The ID of the metric.

name property

A metric is categorized by it's name.

Returns:

Name Type Description
str str

The name of the metric.

phase property

The operational stage of the model when the metric was produced. The phase helps interpret the metric in context of the model's lifecycle.

Returns:

Type Description
Optional[str]

Optional[str]: The phase of the model in wich the metric was produced.

step property

An step is a discrete unit of time that marks a transition between successive states of a machine learning model. Each metric value is associated with some stage of the model indexed by the step.

Returns:

Name Type Description
int Optional[int]

The step of the metric.

value property

A quantitative value representing the model's performance.

Returns:

Name Type Description
Any Any

The value of the metric.

Metrics

Bases: ABC

clear() abstractmethod

Removes all metrics from the collection.

list(name=None) abstractmethod

Get a list of metrics in the collection.

Parameters:

Name Type Description Default
name Optional[str]

The name of the metrics to be listed.

None

Returns:

Type Description
list[Metric]

list[Metric]: The list of metric of the model.

log(name, value, step=None, phase=None) abstractmethod

Add a metric to the collection.

Parameters:

Name Type Description Default
name str

The name of the metric.

required
value Any

The value of the metric.

required
step int

The step in wich the metric was produced.

None
phase Optional[str]

The phase in wich the metric was produced.

None

remove(metric) abstractmethod

Removes the given metric from the collection.