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 (Trial) – A Trial corresponding to the current evaluation of the objective function.

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

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