class_docstr: A tracker for Weights and Biases.
  
  Note that you have to perform wandb login beforehand.
class_docstr_tok: ["A","tracker","for","Weights","and","Biases",".","Note","that","you","have","to","perform","wandb","login","beforehand","."]
docstr: Initialize result tracking via WANDB.
  
  :param project:
      project name your WANDB login has access to.
  :param offline:
      whether to run in offline mode, i.e, without syncing with the wandb server.
  :param kwargs:
      additional keyword arguments passed to :func:`wandb.init`.
  :raises ValueError:
      If the project name is given as None
docstr_tok: ["Initialize","result","tracking","via","WANDB",".",":","param","project",":","project","name","your","WANDB","login","has","access","to",".",":","param","offline",":","whether","to","run","in","offline","mode",",","i.e",",","without","syncing","with","the","wandb","server",".",":","param","kwargs",":","additional","keyword","arguments","passed","to",":","func",":","`","wandb.init","`",".",":","raises","ValueError",":","If","the","project","name","is","given","as","None"]
code: def __init__(
      self,
      project: str,
      offline: bool = False,
      **kwargs,
  ):
      """Initialize result tracking via WANDB.
  
      :param project:
          project name your WANDB login has access to.
      :param offline:
          whether to run in offline mode, i.e, without syncing with the wandb server.
      :param kwargs:
          additional keyword arguments passed to :func:`wandb.init`.
      :raises ValueError:
          If the project name is given as None
      """
      import wandb as _wandb
  
      self.wandb = _wandb
      if project is None:
          raise ValueError("Weights & Biases requires a project name.")
      self.project = project
  
      if offline:
          os.environ[self.wandb.env.MODE] = "dryrun"  # type: ignore
      self.kwargs = kwargs
      self.run = None
  
file_path: pykeen/src/pykeen/trackers/wandb.py
imports: import os
  from typing import TYPE_CHECKING, Any, Mapping, Optional
  from .base import ResultTracker
  from ..utils import flatten_dictionary
label_desc: Use image node_id 1 to create a new WANDBResultTracker object from inherited base classes: ResultTracker with example: obj = WANDBResultTracker(project, offline)