class optuna.integration.PyTorchIgnitePruningHandler(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.

  • trial – A Trial corresponding to the current evaluation of the objective function.

  • metric – A name of metric for pruning, e.g., accuracy and loss.

  • trainer – A trainer engine of PyTorch Ignite. Please refer to ignite.engine.Engine reference for further details.

__init__(trial: Trial, metric: str, trainer: Engine)None[source]

Initialize self. See help(type(self)) for accurate signature.


__init__(trial, metric, trainer)

Initialize self.