Abstract Optuna’s built-in trial.report() raises NotImplementedError in multi-objective studies. MultiMetricPruner works around this by storing intermediate values in trial user attributes and constructing a synthetic single-objective study for the wrapped base pruner to evaluate.
The pruning mode is selected via the joint argument:
| Mode | `joint` | `report` call (Example with `metric_names = ["loss", "acc"]`) | | ------------ | ------- | ---------------------------------------------------------------------------------- | | Multi-metric | `True` | `trial.report({"loss": v1, "acc": v2}, step)` | | Per-metric | `False` | `trial.
Class or Function Names plot_step_distribution Installation You should install plotly to use this visualization.
$ pip install plotly Example This plot shows how many steps (budget, epoch, iterations, etc.) were consumed before pruning occurred for each trial.
fig = plot_step_distribution(study) See example.py for a full example. The following figures are obtained from the analysis of the optimization.