vis4d.engine.callbacks.checkpoint

This module contains utilities for callbacks.

Classes

CheckpointCallback(*args, save_prefix[, ...])

Callback for model checkpointing.

class CheckpointCallback(*args, save_prefix, checkpoint_period=1, **kwargs)[source]

Callback for model checkpointing.

Init callback.

Parameters:
  • save_prefix (str) – Prefix of checkpoint path for saving.

  • checkpoint_period (int, optional) – Checkpoint period. Defaults to 1.

on_train_batch_end(trainer_state, model, loss_module, outputs, batch, batch_idx)[source]

Hook to run at the end of a training batch.

Return type:

None

on_train_epoch_end(trainer_state, model, loss_module)[source]

Hook to run at the end of a training epoch.

Return type:

None

setup()[source]

Setup callback.

Return type:

None