d3rlpy.logging.WanDBAdapter

class d3rlpy.logging.WanDBAdapter(algo, experiment_name, n_steps_per_epoch, project=None)[source]

WandB Logger Adapter class.

This class logs data to Weights & Biases (WandB) for experiment tracking.

Parameters:
  • algo (AlgProtocol) – Algorithm.

  • experiment_name (str) – Name of the experiment.

  • n_steps_per_epoch (int) – Number of steps per epoch.

  • project (Optional[str]) – Project name.

Methods

after_write_metric(epoch, step)[source]

Callback executed after writing metric.

Parameters:
  • epoch (int) –

  • step (int) –

Return type:

None

before_write_metric(epoch, step)[source]

Callback executed before writing metric.

Parameters:
  • epoch (int) –

  • step (int) –

Return type:

None

close()[source]

Closes the logger and finishes the WandB run.

Return type:

None

save_model(epoch, algo)[source]

Saves models to Weights & Biases.

Not implemented for WandB.

Parameters:
  • epoch (int) –

  • algo (SaveProtocol) –

Return type:

None

watch_model(epoch, step)[source]

Watch model parameters / gradients during training.

Parameters:
  • epoch (int) – Epoch.

  • step (int) – Training step.

Return type:

None

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

Writes metric to WandB.

Parameters:
Return type:

None

write_params(params)[source]

Writes hyperparameters to WandB config.

Parameters:

params (dict[str, Any]) –

Return type:

None