nvflare.app_opt.tracking.tb.tb_writer module

class TBWriter(event_type='analytix_log_stats')[source]

Bases: LogWriter

Sends experiment tracking data.

Parameters:

event_type (str) – event type to fire.

add_scalar(tag: str, scalar: float, global_step: int | None = None, **kwargs)[source]

Sends a scalar.

Parameters:
  • tag (str) – Data identifier.

  • scalar (float) – Value to send.

  • global_step (optional, int) – Global step value.

  • **kwargs – Additional arguments to pass to the receiver side.

add_scalars(tag: str, scalars: dict, global_step: int | None = None, **kwargs)[source]

Sends scalars.

Parameters:
  • tag (str) – The parent name for the tags.

  • scalars (dict) – Key-value pair storing the tag and corresponding values.

  • global_step (optional, int) – Global step value.

  • **kwargs – Additional arguments to pass to the receiver side.

flush()[source]

Flushes out the message.

This does nothing, it is defined to mimic the PyTorch SummaryWriter behavior.

get_writer_name() LogWriterName[source]