OnlineWriter#

class stable_ssl.callbacks.OnlineWriter(names: str, path: str | Path, during: str | list[str], every_k_epochs: int = -1, save_last_epoch: bool = False, save_sanity_check: bool = False, all_gather: bool = True)[source]#

Bases: Callback

Attaches an OnlineWriter callback.

on_predict_batch_end(trainer, pl_module, outputs, batch, batch_idx)[source]#

Called when the predict batch ends.

on_sanity_check_end(trainer, pl_module)[source]#

Called when the validation sanity check ends.

on_sanity_check_start(trainer, pl_module)[source]#

Called when the validation sanity check starts.

on_test_batch_end(trainer, pl_module, outputs, batch, batch_idx)[source]#

Called when the test batch ends.

on_train_batch_end(trainer, pl_module, outputs, batch, batch_idx)[source]#

Called when the train batch ends.

Note

The value outputs["loss"] here will be the normalized value w.r.t accumulate_grad_batches of the loss returned from training_step.

on_validation_batch_end(trainer, pl_module, outputs, batch, batch_idx)[source]#

Called when the validation batch ends.