dacapo.experiments.training_stats

Module Contents

Classes

TrainingStats

A class used to represent Training Statistics.

class dacapo.experiments.training_stats.TrainingStats

A class used to represent Training Statistics.

iteration_stats

List[TrainingIterationStats] an ordered list of training stats.

add_iteration_stats(iteration_stats

TrainingIterationStats) -> None: Add a new set of iterations stats to the existing list of iteration stats.

delete_after(iteration

int) -> None: Deletes training stats after a specified iteration number.

trained_until() int

Gets the number of iterations that the model has been trained for.

to_xarray() xr.DataArray

Converts the iteration statistics to a xarray data array.

iteration_stats: List[dacapo.experiments.training_iteration_stats.TrainingIterationStats]
add_iteration_stats(iteration_stats: dacapo.experiments.training_iteration_stats.TrainingIterationStats) None

Add a new iteration stats to the current iteration stats.

Parameters:

iteration_stats (TrainingIterationStats) – a new iteration stats object.

Raises:

assert – if the new iteration stats do not follow the order of existing iteration stats.

delete_after(iteration: int) None

Deletes training stats after a specified iteration.

Parameters:

iteration (int) – the iteration after which the stats are to be deleted.

trained_until() int

The number of iterations trained for (the maximum iteration plus one). Returns zero if no iterations trained yet.

Returns:

number of iterations that the model has been trained for.

Return type:

int

to_xarray() xarray.DataArray

Converts the iteration stats to a data array format easily manipulatable.

Returns:

xarray DataArray of iteration losses.

Return type:

xr.DataArray