optuna_integration.TensorBoardCallback

class optuna_integration.TensorBoardCallback(dirname, metric_name)[source]

Callback to track Optuna trials with TensorBoard.

This callback adds relevant information that is tracked by Optuna to TensorBoard.

See the example.

Parameters:
  • dirname (str) – Directory to store TensorBoard logs.

  • metric_name (str) – Name of the metric. Since the metric itself is just a number, metric_name can be used to give it a name. So you know later if it was roc-auc or accuracy.

Warning

Deprecated in v4.9.0. This feature will be removed in the future. The removal of this feature is currently scheduled for v6.0.0, but this schedule is subject to change. See https://github.com/optuna/optuna/releases/tag/v4.9.0.