class_docstr: Wandb assumes that each trial's information should be logged from a
  separate process. We use Ray actors as forking multiprocessing
  processes is not supported by Ray and spawn processes run into pickling
  problems.
  
  We use a queue for the driver to communicate with the logging process.
  The queue accepts the following items:
  
  - If it's a dict, it is assumed to be a result and will be logged using
    ``wandb.log()``
  - If it's a checkpoint object, it will be saved using ``wandb.log_artifact()``.
class_docstr_tok: ["Wandb","assumes","that","each","trial","'s","information","should","be","logged","from","a","separate","process",".","We","use","Ray","actors","as","forking","multiprocessing","processes","is","not","supported","by","Ray","and","spawn","processes","run","into","pickling","problems",".","We","use","a","queue","for","the","driver","to","communicate","with","the","logging","process",".","The","queue","accepts","the","following","items",":","-","If","it","'s","a","dict",",","it","is","assumed","to","be","a","result","and","will","be","logged","using","``","wandb.log","(",")","``","-","If","it","'s","a","checkpoint","object",",","it","will","be","saved","using","``","wandb.log_artifact","(",")","``","."]
code: def run(self):
      # Since we're running in a separate process already, use threads.
      os.environ["WANDB_START_METHOD"] = "thread"
      run = self._wandb.init(*self.args, **self.kwargs)
      run.config.trial_log_path = self._logdir
  
      _run_wandb_process_run_info_hook(run)
  
      while True:
          item_type, item_content = self.queue.get()
          if item_type == _QueueItem.END:
              break
  
          if item_type == _QueueItem.CHECKPOINT:
              self._handle_checkpoint(item_content)
              continue
  
          assert item_type == _QueueItem.RESULT
          log, config_update = self._handle_result(item_content)
          try:
              self._wandb.config.update(
                  config_update, allow_val_change=True
              )
              self._wandb.log(log)
          except urllib.error.HTTPError as e:
              # Ignore HTTPError. Missing a few data points is not a
              # big issue, as long as things eventually recover.
              logger.warn(
                  "Failed to log result to w&b: {}".format(str(e))
              )
      self._wandb.finish()
  
imports: import enum
  import os
  import pickle
  import urllib
  import warnings
  import numpy
  from numbers import Number
  import pyarrow.fs
  from types import ModuleType
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import ray
  from ray import logger
  from ray.air import session
  from ray.air._internal import usage
  from ray.air.util.node import _force_on_current_node
  from ray.tune.logger import LoggerCallback
  from ray.tune.utils import flatten_dict
  from ray.tune.experiment import Trial
  from ray.train._internal.syncer import DEFAULT_SYNC_TIMEOUT
  from ray._private.storage import _load_class
  from ray.util import PublicAPI
  from ray.util.queue import Queue
label_desc: Use image node_id 2 for calling the _WandbLoggingActor obj's underlying member method code with example usage: obj.run() without return types