class_docstr: Hook for writing the losses, learning rates and meters to `tensorboard <https
  ://www.tensorflow.org/tensorboard`>_.
  
  Global steps are counted in terms of the number of samples processed.
class_docstr_tok: ["Hook","for","writing","the","losses",",","learning","rates","and","meters","to","`","tensorboard","<","https",":","\/\/www.tensorflow.org\/tensorboard","`",">","_",".","Global","steps","are","counted","in","terms","of","the","number","of","samples","processed","."]
docstr: The config is expected to include the key
  "summary_writer" with arguments which correspond
  to those listed at <https://tensorboardx.
  readthedocs.io/en/latest/tensorboard.html#tensorboardX.SummaryWriter>:
docstr_tok: ["The","config","is","expected","to","include","the","key","''","summary_writer","''","with","arguments","which","correspond","to","those","listed","at","<","https",":","\/\/tensorboardx",".","readthedocs.io\/en\/latest\/tensorboard.html","#","tensorboardX.SummaryWriter",">",":"]
code: def from_config(cls, config: Dict[str, Any]) -> "TensorboardPlotHook":
      """The config is expected to include the key
      "summary_writer" with arguments which correspond
      to those listed at <https://tensorboardx.
      readthedocs.io/en/latest/tensorboard.html#tensorboardX.SummaryWriter>:
  
      """
      tb_writer = SummaryWriter(**config["summary_writer"])
      log_period = config.get("log_period", 10)
      return cls(tb_writer=tb_writer, log_period=log_period)
  
file_path: ClassyVision/classy_vision/hooks/tensorboard_plot_hook.py
imports: import logging
  import time
  from itertools import accumulate
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  from classy_vision.generic.distributed_util import all_reduce_max, is_primary
  from classy_vision.hooks import register_hook
  from classy_vision.hooks.classy_hook import ClassyHook
label_desc: Use image node_id 2 for calling the TensorboardPlotHook obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls