class optuna.integration.MXNetPruningCallback(trial: optuna.trial._trial.Trial, eval_metric: str)[source]

MXNet callback to prune unpromising trials.

See the example if you want to add a pruning callback which observes accuracy.

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

  • eval_metric – An evaluation metric name for pruning, e.g., cross-entropy and accuracy. If using default metrics like mxnet.metrics.Accuracy, use it’s default metric name. For custom metrics, use the metric_name provided to constructor. Please refer to mxnet.metrics reference for further details.

__init__(trial: optuna.trial._trial.Trial, eval_metric: str)None[source]

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


__init__(trial, eval_metric)

Initialize self.