d3rlpy.logging.TensorboardAdapter

class d3rlpy.logging.TensorboardAdapter(*args, **kwds)[source]

TensorboardAdapter class.

This class saves metrics for Tensorboard visualization, powered by tensorboardX.

Note that this class does not save models. If you want to save models during training, consider FileAdapter as well.

Parameters
  • root_dir (str) – Top-level log directory.

  • experiment_name (str) – Experiment name.

Methods

after_write_metric(epoch, step)[source]

Callback executed after write_metric method.

Parameters
  • epoch (int) – Epoch.

  • step (int) – Training step.

Return type

None

before_write_metric(epoch, step)[source]

Callback executed before write_metric method.

Parameters
  • epoch (int) – Epoch.

  • step (int) – Training step.

Return type

None

close()[source]

Closes this LoggerAdapter.

Return type

None

save_model(epoch, algo)[source]

Saves models.

Parameters
  • epoch (int) – Epoch.

  • algo (d3rlpy.logging.logger.SaveProtocol) – Algorithm that provides save method.

Return type

None

write_metric(epoch, step, name, value)[source]

Writes metric.

Parameters
  • epoch (int) – Epoch.

  • step (int) – Training step.

  • name (str) – Metric name.

  • value (float) – Metric value.

Return type

None

write_params(params)[source]

Writes hyperparameters.

Parameters

params (Dict[str, Any]) – Dictionary of hyperparameters.

Return type

None