avalanche.logging.TensorboardLogger

class avalanche.logging.TensorboardLogger(tb_log_dir: Union[str, Path] = './tb_data', filename_suffix: str = '')[source]

Tensorboard logger.

The TensorboardLogger provides an easy integration with Tensorboard logging. Each monitored metric is automatically logged to Tensorboard. The user can inspect results in real time by appropriately launching tensorboard with tensorboard –logdir=/path/to/tb_log_exp_name.

AWS’s S3 buckets and (if tensorflow is installed) GCloud storage url are supported.

If no parameters are provided, the default folder in which tensorboard log files are placed is “./runs/”.

Note

We rely on PyTorch implementation of Tensorboard. If you don’t have Tensorflow installed in your environment, tensorboard will tell you that it is running with reduced feature set. This should not impact on the logger performance.

__init__(tb_log_dir: Union[str, Path] = './tb_data', filename_suffix: str = '')[source]

Creates an instance of the TensorboardLogger.

Parameters
  • tb_log_dir – path to the directory where tensorboard log file will be stored. Default to “./tb_data”.

  • filename_suffix – string suffix to append at the end of tensorboard log file. Default ‘’.

Methods

__init__([tb_log_dir, filename_suffix])

Creates an instance of the TensorboardLogger.

log_metrics(metric_values)

Receive a list of MetricValues to log.

log_single_metric(name, value, x_plot)

Log a metric value.