AllenNLPPruningCallback(trial: Optional[optuna.trial._trial.Trial] = None, monitor: Optional[str] = None)¶
AllenNLP callback to prune unpromising trials.
See the example if you want to add a proning callback which observes a metric.
You can also see the tutorial of our AllenNLP integration on AllenNLP Guide.
AllenNLPPruningCallbackis instantiated in Python script, trial and monitor are mandatory.
On the other hand, when
AllenNLPPruningCallbackis used with
AllenNLPExecutorsets environment variables for a study name, trial id, monitor, and storage. Then
AllenNLPPruningCallbackloads them to restore
trial – A
Trialcorresponding to the current evaluation of the objective function.
monitor – An evaluation metric for pruning, e.g.
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: Optional[optuna.trial._trial.Trial] = None, monitor: Optional[str] = None)¶
Initialize self. See help(type(self)) for accurate signature.
Stub method for EpochCallback.register.