optuna.integration.TensorBoardCallback

class optuna.integration.TensorBoardCallback(dirname: str, metric_name: str)[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 – Directory to store TensorBoard logs.

  • metric_name – 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.

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__(dirname: str, metric_name: str)None[source]

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

Methods

__init__(dirname, metric_name)

Initialize self.