optuna.integration.SkorchPruningCallback¶
-
class
optuna.integration.SkorchPruningCallback(trial: optuna.trial._trial.Trial, monitor: str)[source]¶ Skorch callback to prune unpromising trials.
New in version 2.1.0.
- Parameters
trial – A
Trialcorresponding to the current evaluation of the objective function.monitor – An evaluation metric for pruning, e.g.
val_lossorval_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)