core.utils.trainutils.RuntimeLimits
core.utils.trainutils.RuntimeLimits(
max_time_per_run= None ,
max_epochs_per_run= None ,
max_epochs_total= None ,
epoch_start= None ,
)
Keeps track of the runtime limits (time limit, epoch limit, max. number of epochs for model).
Parameters
max_time_per_run
float
maximum time for run, in seconds [soft limit, break only after full epoch]
None
max_epochs_per_run
int
maximum number of epochs for run
None
max_epochs_total
int
maximum total number of epochs for model
None
epoch_start
int
start epoch of run
None
Methods
limits_exceeded
core.utils.trainutils.RuntimeLimits.limits_exceeded(epoch= None )
Check whether any of the runtime limits are exceeded.
Returns
limits_exceeded
bool
flag whether runtime limits are exceeded and run should be stopped; if limits_exceeded = True, this prints a message for the reason
local_limits_exceeded
core.utils.trainutils.RuntimeLimits.local_limits_exceeded(epoch= None )
Check whether any of the local runtime limits are exceeded. Local runtime limits include max_epochs_per_run and max_time_per_run, but not max_epochs_total.
Returns
limits_exceeded
bool
flag whether local runtime limits are exceeded