mlr_callback_set.progress: Progress Callback

mlr_callback_set.progressR Documentation

Progress Callback

Description

Prints a progress bar and the metrics for training and validation.

Super class

mlr3torch::CallbackSet -> CallbackSetProgress

Methods

Public methods

Inherited methods

Method on_epoch_begin()

Initializes the progress bar for training.

Usage
CallbackSetProgress$on_epoch_begin()

Method on_batch_end()

Increments the training progress bar.

Usage
CallbackSetProgress$on_batch_end()

Method on_before_valid()

Creates the progress bar for validation.

Usage
CallbackSetProgress$on_before_valid()

Method on_batch_valid_end()

Increments the validation progress bar.

Usage
CallbackSetProgress$on_batch_valid_end()

Method on_epoch_end()

Prints a summary of the training and validation process.

Usage
CallbackSetProgress$on_epoch_end()

Method on_end()

Prints the time at the end of training.

Usage
CallbackSetProgress$on_end()

Method clone()

The objects of this class are cloneable with this method.

Usage
CallbackSetProgress$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other Callback: TorchCallback, as_torch_callback(), as_torch_callbacks(), callback_set(), mlr3torch_callbacks, mlr_callback_set, mlr_callback_set.checkpoint, mlr_callback_set.tb, mlr_callback_set.unfreeze, mlr_context_torch, t_clbk(), torch_callback()

Examples


task = tsk("iris")

learner = lrn("classif.mlp", epochs = 5, batch_size = 1,
  callbacks = t_clbk("progress"), validate = 0.3)
learner$param_set$set_values(
  measures_train = msrs(c("classif.acc", "classif.ce")),
  measures_valid = msr("classif.ce")
)

learner$train(task)


mlr3torch documentation built on April 4, 2025, 3:03 a.m.