TensorBoard SummaryWriter¶
Utilities for logging data to TensorBoard.
SummaryWriter¶
skrl provides a simple SummaryWriter implementation to log data to TensorBoard without relying on third-party libraries.
API¶
- class skrl.utils.tensorboard.SummaryWriter(log_dir: str, *, queue_size: int = 10, flush_seconds: int = 120)[source]¶
Bases:
objectTensorBoard summary writer.
- Parameters:
log_dir – Directory to save the event file.
queue_size – Maximum number of events to keep in the queue before forcing a flush to persistent storage.
flush_seconds – Number of seconds between flushing pending events to persistent storage.
Methods:
add_scalar(*, tag, value, timestep)Add a scalar value to the summary.
close()Close the summary writer.
flush()Flush pending events to persistent storage.