d3rlpy.logging.FileAdapter

class d3rlpy.logging.FileAdapter(logdir)[source]

FileAdapter class.

This class saves metrics as CSV files, hyperparameters as json file and models as d3 files.

Parameters:

logdir (str) – Log directory.

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 (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

Attributes

logdir