class_docstr: Weights & Biases Logger.
  
  This is a logger class that can be passed into the initialization
  of a KerasModel or TorchModel. It initializes and sets up a wandb logger which
  will log the specified metrics calculated on the specific datasets
  to the user's W&B dashboard.
  
  If a WandbLogger is provided to the wandb_logger flag,
  the metrics are logged to Weights & Biases, along with other information
  such as epoch number, losses, sample counts, and model configuration data.
class_docstr_tok: ["Weights","&","Biases","Logger",".","This","is","a","logger","class","that","can","be","passed","into","the","initialization","of","a","KerasModel","or","TorchModel",".","It","initializes","and","sets","up","a","wandb","logger","which","will","log","the","specified","metrics","calculated","on","the","specific","datasets","to","the","user","'s","W","&","B","dashboard",".","If","a","WandbLogger","is","provided","to","the","wandb_logger","flag",",","the","metrics","are","logged","to","Weights","&","Biases",",","along","with","other","information","such","as","epoch","number",",","losses",",","sample","counts",",","and","model","configuration","data","."]
docstr: Initializes a W&B run and create a run object.
  If a pre-existing run is already initialized, use that instead.
docstr_tok: ["Initializes","a","W","&","B","run","and","create","a","run","object",".","If","a","pre-existing","run","is","already","initialized",",","use","that","instead","."]
code: def setup(self):
      """Initializes a W&B run and create a run object.
      If a pre-existing run is already initialized, use that instead.
      """
      if self._wandb.run is None:
          self.wandb_run = self._wandb.init(**self.wandb_init_params)
      else:
          self.wandb_run = self._wandb.run
      self.initialized = True
  
file_path: deepchem/deepchem/models/wandblogger.py
imports: import logging
  import importlib.util
  from typing import Optional, Union, List, Dict
label_desc: Use image node_id 2 for calling the WandbLogger obj's underlying member method code with example usage: obj.setup() without return types