scglue.models.plugins.EarlyStopping

class scglue.models.plugins.EarlyStopping(monitor, patience, burnin=0, wait_n_lrs=0)[source]

Bases: TrainingPlugin

Early stop model training when loss no longer decreases

Parameters:
  • monitor (str) – Loss to monitor

  • patience (int) – Patience to stop early

  • burnin (int) – Burn-in epochs to skip before initializing early stopping

  • wait_n_lrs (int) – Wait n learning rate scheduling events before starting early stopping

Methods

attach

Attach custom handlers to training or validation engine

Attributes

logger