StopperTrainingCallback

class StopperTrainingCallback(stopper, *, triples_factory, last_best_epoch=None, best_epoch_model_file_path)[source]

Bases: TrainingCallback

An adapter for the pykeen.stopper.Stopper.

Initialize the callback.

Parameters:
  • stopper (Stopper) – the stopper

  • triples_factory (CoreTriplesFactory) – the triples factory used for saving the state

  • last_best_epoch (Optional[int]) – the last best epoch

  • best_epoch_model_file_path (Optional[Path]) – the path under which to store the best model checkpoint

Methods Summary

post_epoch(epoch, epoch_loss, **kwargs)

Call after epoch.

Methods Documentation

post_epoch(epoch, epoch_loss, **kwargs)[source]

Call after epoch.

Return type:

None

Parameters:
  • epoch (int) –

  • epoch_loss (float) –

  • kwargs (Any) –