optuna.integration.ChainerPruningExtension

class optuna.integration.ChainerPruningExtension(trial: optuna.trial._trial.Trial, observation_key: str, pruner_trigger: Union[Tuple[int, str], IntervalTrigger, ManualScheduleTrigger])[source]

Chainer extension to prune unpromising trials.

See the example if you want to add a pruning extension which observes validation accuracy of a Chainer Trainer.

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

  • observation_key – An evaluation metric for pruning, e.g., main/loss and validation/main/accuracy. Please refer to chainer.Reporter reference for further details.

  • pruner_trigger

    A trigger to execute pruning. pruner_trigger is an instance of IntervalTrigger or ManualScheduleTrigger. IntervalTrigger can be specified by a tuple of the interval length and its unit like (1, 'epoch').

__init__(trial: optuna.trial._trial.Trial, observation_key: str, pruner_trigger: Union[Tuple[int, str], IntervalTrigger, ManualScheduleTrigger])None[source]

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

Methods

__init__(trial, observation_key, pruner_trigger)

Initialize self.