vis4d.engine.callbacks.trainer_state

Trainer state for callbacks.

Classes

TrainerState

State of the trainer.

class TrainerState[source]

State of the trainer.

current_epoch

Current epoch.

Type:

int

num_epochs

Total number of the training epochs.

Type:

int

global_step

Global step.

Type:

int

num_steps

Total number of the training steps.

Type:

int

train_dataloader

Training dataloader.

Type:

DataLoader[DictData] | None

num_train_batches

Number of training batches.

Type:

int | None

test_dataloader

List of test dataloaders.

Type:

list[DataLoader[DictData]] | None

num_test_batches

List of number of test batches.

Type:

list[int] | None

optimizers

List of optimizers.

Type:

NotRequired[list[Optimizer]]

metrics

Metrics for the logging.

Type:

NotRequired[dict[str, float]]