dmlcloud.TrainingHistory

class dmlcloud.TrainingHistory

Stores the training history of a model.

Metrics can either be ArrayLike objects or any pickleable object.

Usage:

history = TrainingHistory() history.append_metric(‘loss’, 0.5) history.append_metric(‘accuracy’, 0.99) history.next_step()

for metric in history:

print(f’{metric}’: history[metric])

__init__()

Methods

__init__()

append_metric(name, value)

Adds a value for a metric at the current step.

append_metrics(**metrics)

Adds multiple metrics at the current step.

items()

keys()

last()

Returns the last value for each metric.

max()

Returns a namedtuple (value, step) containing the maximum value and the corresponding step for each metric across all steps.

min()

Returns a namedtuple (value, step) containing the minimum value and the corresponding step for each metric across all steps.

rows()

values()