d3rlpy.logging.CombineAdapter

class d3rlpy.logging.CombineAdapter(adapters)[source]

CombineAdapter class.

This class combines multiple LoggerAdapter to write metrics through different adapters at the same time.

Parameters:

adapters (Sequence[LoggerAdapter]) – List of LoggerAdapter.

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