# optuna.integration.PyTorchIgnitePruningHandler¶

class optuna.integration.PyTorchIgnitePruningHandler(trial, metric, trainer)[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 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.