optuna.integration.SkorchPruningCallback¶
-
class
optuna.integration.
SkorchPruningCallback
(trial, monitor)[source]¶ Skorch callback to prune unpromising trials.
New in version 2.1.0.
- Parameters
trial – A
Trial
corresponding to the current evaluation of the objective function.monitor – An evaluation metric for pruning, e.g.
val_loss
orval_acc
. The metrics are obtained from the returned dictionaries, i.e.,net.histroy
. The names thus depend on how this dictionary is formatted.
Methods
on_epoch_end
(net, **kwargs)