optuna.integration.AllenNLPPruningCallback¶
-
class
optuna.integration.
AllenNLPPruningCallback
(trial: optuna.trial._trial.Trial, monitor: str)[source]¶ AllenNLP callback to prune unpromising trials.
See the example if you want to add a proning callback which observes a metric.
- Parameters
trial – A
Trial
corresponding to the current evaluation of the objective function.monitor – An evaluation metric for pruning, e.g.
validation_loss
orvalidation_accuracy
.
Note
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, monitor: str)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(trial, monitor)Initialize self.