optuna_integration.SkorchPruningCallback
- class optuna_integration.SkorchPruningCallback(trial, monitor)[source]
Skorch callback to prune unpromising trials.
Added in version 2.1.0.
- Parameters:
trial (optuna.trial.Trial) – A
Trialcorresponding to the current evaluation of the objective function.monitor (str) – 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)