PyTorch Lightning callback to prune unpromising trials.
See the example if you want to add a pruning callback which observes accuracy.
trial – A
Trialcorresponding to the current evaluation of the objective function.
monitor – An evaluation metric for pruning, e.g.,
val_acc. The metrics are obtained from the returned dictionaries from e.g.
pytorch_lightning.LightningModule.validation_epoch_endand the names thus depend on how this dictionary is formatted.
For the distributed data parallel training, the version of PyTorchLightning needs to be higher than or equal to v1.4.0. In addition,
Studyshould be instantiated with RDB storage.