class_docstr: TensorboardEventHandler is an event handler that will write known events to
  the provided SummaryWriter.
  
  This currently only supports ``torch.monitor.Stat`` events which are logged
  as scalars.
  
  Example:
      >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_MONITOR)
      >>> # xdoctest: +REQUIRES(module:tensorboard)
      >>> from torch.utils.tensorboard import SummaryWriter
      >>> from torch.monitor import TensorboardEventHandler, register_event_handler
      >>> writer = SummaryWriter("log_dir")
      >>> register_event_handler(TensorboardEventHandler(writer))
class_docstr_tok: ["TensorboardEventHandler","is","an","event","handler","that","will","write","known","events","to","the","provided","SummaryWriter",".","This","currently","only","supports","``","torch.monitor.Stat","``","events","which","are","logged","as","scalars",".","Example",":",">",">",">","#","xdoctest",":","+REQUIRES","(","env",":","TORCH_DOCTEST_MONITOR",")",">",">",">","#","xdoctest",":","+REQUIRES","(","module",":","tensorboard",")",">",">",">","from","torch.utils.tensorboard","import","SummaryWriter",">",">",">","from","torch.monitor","import","TensorboardEventHandler",",","register_event_handler",">",">",">","writer","=","SummaryWriter","(","``","log_dir","''",")",">",">",">","register_event_handler","(","TensorboardEventHandler","(","writer",")",")"]
docstr: Constructs the ``TensorboardEventHandler``.
docstr_tok: ["Constructs","the","``","TensorboardEventHandler","``","."]
code: def __init__(self, writer: "SummaryWriter") -> None:
      """
      Constructs the ``TensorboardEventHandler``.
      """
      self._writer = writer
  
imports: from torch._C._monitor import *
  from typing import TYPE_CHECKING
label_desc: Use image node_id 1 to create a new TensorboardEventHandler object  with example: obj = TensorboardEventHandler(writer)