scvi.train.LoudEarlyStopping#

class scvi.train.LoudEarlyStopping(**kwargs)[source]#

Bases: EarlyStopping

Wrapper of Pytorch Lightning EarlyStopping callback that prints the reason for stopping on teardown.

When the early stopping condition is met, the reason is saved to the callback instance, then printed on teardown. By printing on teardown, we do not interfere with the progress bar callback.

Attributes table#

Methods table#

teardown(_trainer, _pl_module[, stage])

Called when fit, validate, test, predict, or tune ends.

Attributes#

mode_dict#

LoudEarlyStopping.mode_dict = {'max': <built-in method gt of type object>, 'min': <built-in method lt of type object>}#

monitor_op#

LoudEarlyStopping.monitor_op[source]#
Return type:

Callable

order_dict#

LoudEarlyStopping.order_dict = {'max': '>', 'min': '<'}#

state_key#

LoudEarlyStopping.state_key[source]#
Return type:

str

Methods#

teardown#

LoudEarlyStopping.teardown(_trainer, _pl_module, stage=None)[source]#

Called when fit, validate, test, predict, or tune ends.

Return type:

None