pe.metric_item package

class pe.metric_item.FloatListMetricItem(name, value)[source]

Bases: MetricItem

The metric item for a list of float values.

class pe.metric_item.FloatMetricItem(name, value)[source]

Bases: MetricItem

The metric item for a single float value.

class pe.metric_item.ImageListMetricItem(num_images_per_row=None, *args, **kwargs)[source]

Bases: MetricItem

The metric item for a list of images.

__init__(num_images_per_row=None, *args, **kwargs)[source]

Constructor.

Parameters:

num_images_per_row (int, optional) – The number of images per row when saving to the file, defaults to None

property num_images_per_row

Get the number of images per row when saving to the file.

Returns:

The number of images per row when saving to the file

Return type:

int or None

class pe.metric_item.ImageMetricItem(name, value)[source]

Bases: MetricItem

The metric item for an image.

class pe.metric_item.MatplotlibMetricItem(name, value)[source]

Bases: MetricItem

The metric item for Matplotlib figures.

clean_up()[source]

Clean up the metric item.

class pe.metric_item.MetricItem(name, value)[source]

Bases: object

The base class for the metric item.

__init__(name, value)[source]

Constructor.

Parameters:
  • name (str) – The name of the metric item

  • value (object) – The value of the metric item

clean_up()[source]

Clean up the metric item.

property name

Get the name of the metric item.

Returns:

The name of the metric item

Return type:

str

property value

Get the value of the metric item.

Returns:

The value of the metric item

Return type:

object

class pe.metric_item.metric_scope(name)[source]

Bases: object

The context manager to manage the metric scope.