class optuna.integration.CatalystPruningCallback(trial: optuna.trial._trial.Trial, metric: str = 'loss')[source]

Catalyst callback to prune unpromising trials.

See the example if you want to add a pruning callback which observes the accuracy of Catalyst’s SupervisedRunner.

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

  • metric (str) – Name of a metric, which is passed to catalyst.core.State.valid_metrics dictionary to fetch the value of metric computed on validation set. Pruning decision is made based on this value.


Added in v2.0.0 as an experimental feature. The interface may change in newer versions without prior notice. See https://github.com/optuna/optuna/releases/tag/v2.0.0.

__init__(trial: optuna.trial._trial.Trial, metric: str = 'loss')None[source]

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


__init__(trial[, metric])

Initialize self.