events

CheckpointSaved

class CheckpointSaved(model_dir)

This event should be emitted when a model is saved as part of checkpointing in a callback.

Parameters

model_dir (str) – the directory the model was saved to.

model_dir: str
property msg

EarlyStop

class EarlyStop(epoch)

this event should be emitted when training is instructed to stop early.

Parameters

epoch (int) – the epoch that stopping is triggered.

epoch: int
property msg

Event

class Event

base class for all events.

property msg: str
Return type

str

logmsg()
Return type

str


Improvement

class Improvement(field, stage, steps, best, last_best)

This event should be emitted on an monitored improvement.

Parameters
  • field (str) – the field being monitored.

  • stage (str) – the stage being monitored.

  • steps (int) – the number of steps (generally epochs) that between this and the last improvement.

  • best (float) – the best value.

  • last_best (float) – the last best value

best: float
last_best: float
property msg: str
Return type

str


MonitoringEvent

class MonitoringEvent(field, stage, steps)

base class for monitoring events

field: str
stage: str
steps: int
logmsg()
Return type

str


Stagnation

class Stagnation(field, stage, steps, best)

This event should be emitted when a monitored metric or loss is not improving.

Parameters
  • field (str) – the field being monitored.

  • stage (str) – the stage being monitored.

  • steps (int) – the number of steps (generally epochs) that the measured value has been stagnant.

  • best (float) – the best value seen so far.

best: float
property msg: str
Return type

str


UnbottleEvent

class UnbottleEvent(epoch, block, lr)

this event should be emitted when fintuning.

Parameters

epoch (int) – the epoch that stopping is triggered.

epoch: int
block: str
lr: float
property msg

UnbottlingComplete

class UnbottlingComplete

this event should be emitted when unbottling is complete during finetuning.

Parameters

epoch – the epoch that stopping is triggered.

property msg