drytorch.trackers.tensorboard

Module containing a TensorBoard tracker.

Classes

TensorBoard([par_dir, start_server, ...])

Tracker that wraps the TensorBoard SummaryWriter.

class TensorBoard(par_dir: Path | None = None, start_server: bool = True, max_queue_size: int = 10, flush_secs: int = 120)[source]

Bases: Dumper

Tracker that wraps the TensorBoard SummaryWriter.

base_port

starting port number for TensorBoard.

Type:

ClassVar[int]

instance_count

counter for TensorBoard instances started.

Type:

ClassVar[int]

Initialize.

Parameters:
  • par_dir (Path | None) – the parent directory for the tracker data. Default uses the same of the current experiment.

  • start_server (bool) – if True, start a local TensorBoard server.

  • max_queue_size (int) – see tensorboard.SummaryWriter docs.

  • flush_secs (int) – tensorboard.SummaryWriter docs.

property writer: SummaryWriter

The active SummaryWriter instance.

Raises:

AccessOutsideScopeError – if no run has been started yet.

clean_up() None[source]

Remove experimental data from the tracker.

Return type:

None

notify(event: Event) None[source]
notify(event: StartExperimentEvent) None
notify(event: MetricEvent) None

Notify the tracker of an event.

Parameters:

event (Event) – the event to notify about.

Return type:

None