class_docstr: Weights and Biases logger.
  
  The `WandBLogger` provides an easy integration with
  Weights & Biases logging. Each monitored metric is automatically
  logged to a dedicated Weights & Biases project dashboard.
  
  External storage for W&B Artifacts (for instance - AWS S3 and GCS
  buckets) uri are supported.
  
  The wandb log files are placed by default in "./wandb/" unless specified.
  
  .. note::
  
      TensorBoard can be synced on to the W&B dedicated dashboard.
docstr: Creates an instance of the `WandBLogger`.
  
  :param project_name: Name of the W&B project.
  :param run_name: Name of the W&B run.
  :param log_artifacts: Option to log model weights as W&B Artifacts.
      Note that, in order for model weights to be logged, the
      :class:`WeightCheckpoint` metric must be added to the
      evaluation plugin.
  :param path: Path to locally save the model checkpoints.
  :param uri: URI identifier for external storage buckets (GCS, S3).
  :param sync_tfboard: Syncs TensorBoard to the W&B dashboard UI.
  :param save_code: Saves the main training script to W&B.
  :param config: Syncs hyper-parameters and config values used to W&B.
  :param dir: Path to the local log directory for W&B logs to be saved at.
  :param params: All arguments for wandb.init() function call. Visit
      https://docs.wandb.ai/ref/python/init to learn about all
      wand.init() parameters.
docstr_tok: ["Creates","an","instance","of","the","`","WandBLogger","`",".",":","param","project_name",":","Name","of","the","W","&","B","project",".",":","param","run_name",":","Name","of","the","W","&","B","run",".",":","param","log_artifacts",":","Option","to","log","model","weights","as","W","&","B","Artifacts",".","Note","that",",","in","order","for","model","weights","to","be","logged",",","the",":","class",":","`","WeightCheckpoint","`","metric","must","be","added","to","the","evaluation","plugin",".",":","param","path",":","Path","to","locally","save","the","model","checkpoints",".",":","param","uri",":","URI","identifier","for","external","storage","buckets","(","GCS",",","S3",")",".",":","param","sync_tfboard",":","Syncs","TensorBoard","to","the","W","&","B","dashboard","UI",".",":","param","save_code",":","Saves","the","main","training","script","to","W","&","B",".",":","param","config",":","Syncs","hyper-parameters","and","config","values","used","to","W","&","B",".",":","param","dir",":","Path","to","the","local","log","directory","for","W","&","B","logs","to","be","saved","at",".",":","param","params",":","All","arguments","for","wandb.init","(",")","function","call",".","Visit","https",":","\/\/docs.wandb.ai\/ref\/python\/init","to","learn","about","all","wand.init","(",")","parameters","."]
code: def __init__(
      self,
      project_name: str = "Avalanche",
      run_name: str = "Test",
      log_artifacts: bool = False,
      path: Union[str, Path] = "Checkpoints",
      uri: Optional[str] = None,
      sync_tfboard: bool = False,
      save_code: bool = True,
      config: Optional[object] = None,
      dir: Optional[Union[str, Path]] = None,
      params: Optional[dict] = None,
  ):
      """Creates an instance of the `WandBLogger`.
  
      :param project_name: Name of the W&B project.
      :param run_name: Name of the W&B run.
      :param log_artifacts: Option to log model weights as W&B Artifacts.
          Note that, in order for model weights to be logged, the
          :class:`WeightCheckpoint` metric must be added to the
          evaluation plugin.
      :param path: Path to locally save the model checkpoints.
      :param uri: URI identifier for external storage buckets (GCS, S3).
      :param sync_tfboard: Syncs TensorBoard to the W&B dashboard UI.
      :param save_code: Saves the main training script to W&B.
      :param config: Syncs hyper-parameters and config values used to W&B.
      :param dir: Path to the local log directory for W&B logs to be saved at.
      :param params: All arguments for wandb.init() function call. Visit
          https://docs.wandb.ai/ref/python/init to learn about all
          wand.init() parameters.
      """
      super().__init__()
      self.import_wandb()
      self.project_name = project_name
      self.run_name = run_name
      self.log_artifacts = log_artifacts
      self.path = path
      self.uri = uri
      self.sync_tfboard = sync_tfboard
      self.save_code = save_code
      self.config = config
      self.dir = dir
      self.params = params
      self.args_parse()
      self.before_run()
      self.step = 0
      self.exp_count = 0
  
imports: import re
  from typing import Optional, Union, List, TYPE_CHECKING
  from pathlib import Path
  import os
  import warnings
  import numpy
  from numpy import array
  from torch import Tensor
  from PIL.Image import Image
  from matplotlib.pyplot import Figure
  from avalanche.core import SupervisedPlugin
  from avalanche.evaluation.metric_results import AlternativeValues, MetricValue, TensorImage
  from avalanche.logging import BaseLogger
label_desc: Use image node_id 1 to create a new WandBLogger object from inherited base classes: BaseLogger, SupervisedPlugin with example: obj = WandBLogger(project_name, run_name, log_artifacts, path, uri, sync_tfboard, save_code, config, dir, params)