class_docstr: Tensorboard logger.
  
  The `TensorboardLogger` provides an easy integration with
  Tensorboard logging. Each monitored metric is automatically
  logged to Tensorboard.
  The user can inspect results in real time by appropriately launching
  tensorboard with `tensorboard --logdir=/path/to/tb_log_exp_name`.
  
  AWS's S3 buckets and (if tensorflow is installed) GCloud storage url are
  supported.
  
  If no parameters are provided, the default folder in which tensorboard
  log files are placed is "./runs/".
  
  .. note::
  
      We rely on PyTorch implementation of Tensorboard. If you
      don't have Tensorflow installed in your environment,
      tensorboard will tell you that it is running with reduced
      feature set. This should not impact on the logger performance.
class_docstr_tok: ["Tensorboard","logger",".","The","`","TensorboardLogger","`","provides","an","easy","integration","with","Tensorboard","logging",".","Each","monitored","metric","is","automatically","logged","to","Tensorboard",".","The","user","can","inspect","results","in","real","time","by","appropriately","launching","tensorboard","with","`","tensorboard","--","logdir=\/path\/to\/tb_log_exp_name","`",".","AWS","'s","S3","buckets","and","(","if","tensorflow","is","installed",")","GCloud","storage","url","are","supported",".","If","no","parameters","are","provided",",","the","default","folder","in","which","tensorboard","log","files","are","placed","is","``",".\/runs\/","''",".","..","note",":",":","We","rely","on","PyTorch","implementation","of","Tensorboard",".","If","you","do","n't","have","Tensorflow","installed","in","your","environment",",","tensorboard","will","tell","you","that","it","is","running","with","reduced","feature","set",".","This","should","not","impact","on","the","logger","performance","."]
code: def log_single_metric(self, name, value, x_plot):
      if isinstance(value, AlternativeValues):
          value = value.best_supported_value(
              Image, Tensor, TensorImage, Figure, float, int
          )
  
      if isinstance(value, Figure):
          self.writer.add_figure(name, value, global_step=x_plot)
  
      elif isinstance(value, Image):
          self.writer.add_image(
              name, to_tensor(value), global_step=x_plot
          )
  
      elif isinstance(value, Tensor):
          self.writer.add_histogram(name, value, global_step=x_plot)
  
      elif isinstance(value, (float, int)):
          self.writer.add_scalar(name, value, global_step=x_plot)
  
      elif isinstance(value, TensorImage):
          self.writer.add_image(name, value.image, global_step=x_plot)
  
file_path: avalanche/avalanche/logging/tensorboard_logger.py
imports: from pathlib import Path
  from typing import Union
  from PIL.Image import Image
  from torch import Tensor
  from torch.utils.tensorboard import SummaryWriter
  from matplotlib.pyplot import Figure
  from torchvision.transforms.functional import to_tensor
  from avalanche.evaluation.metric_results import AlternativeValues, TensorImage
  from avalanche.logging import BaseLogger
  import weakref
label_desc: Use image node_id 2 for calling the TensorboardLogger obj's underlying member method code with example usage: obj.log_single_metric(name, value, x_plot) without return types