optuna.integration.PyTorchIgnitePruningHandler¶
-
class
optuna.integration.PyTorchIgnitePruningHandler(trial: optuna.trial._trial.Trial, metric: str, trainer: Engine)[source]¶ PyTorch Ignite handler to prune unpromising trials.
See the example if you want to add a pruning handler which observes validation accuracy.
- Parameters
trial – A
Trialcorresponding to the current evaluation of the objective function.metric – A name of metric for pruning, e.g.,
accuracyandloss.trainer – A trainer engine of PyTorch Ignite. Please refer to ignite.engine.Engine reference for further details.