class_docstr: Config object.
  
  Config objects are intended to hold all of the hyperparameters associated with
  a wandb run and are saved with the run object when `wandb.init` is called.
  
  We recommend setting `wandb.config` once at the top of your training experiment or
  setting the config as a parameter to init, ie. `wandb.init(config=my_config_dict)`
  
  You can create a file called `config-defaults.yaml`, and it will automatically be
  loaded into `wandb.config`. See https://docs.wandb.com/guides/track/config#file-based-configs.
  
  You can also load a config YAML file with your custom name and pass the filename
  into `wandb.init(config="special_config.yaml")`.
  See https://docs.wandb.com/guides/track/config#file-based-configs.
  
  Examples:
      Basic usage
      ```
      wandb.config.epochs = 4
      wandb.init()
      for x in range(wandb.config.epochs):
          # train
      ```
  
      Using wandb.init to set config
      ```
      wandb.init(config={"epochs": 4, "batch_size": 32})
      for x in range(wandb.config.epochs):
          # train
      ```
  
      Nested configs
      ```
      wandb.config['train']['epochs'] = 4
      wandb.init()
      for x in range(wandb.config['train']['epochs']):
          # train
      ```
  
      Using absl flags
      ```
      flags.DEFINE_string(‘model’, None, ‘model to run’) # name, default, help
      wandb.config.update(flags.FLAGS) # adds all absl flags to config
      ```
  
      Argparse flags
      ```python
      wandb.init()
      wandb.config.epochs = 4
  
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "-b",
          "--batch-size",
          type=int,
          default=8,
          metavar="N",
          help="input batch size for training (default: 8)",
      )
      args = parser.parse_args()
      wandb.config.update(args)
      ```
  
      Using TensorFlow flags (deprecated in tensorflow v2)
      ```python
      flags = tf.app.flags
      flags.DEFINE_string("data_dir", "/tmp/data")
      flags.DEFINE_integer("batch_size", 128, "Batch size.")
      wandb.config.update(flags.FLAGS)  # adds all of the tensorflow flags to config
      ```
class_docstr_tok: ["Config","object",".","Config","objects","are","intended","to","hold","all","of","the","hyperparameters","associated","with","a","wandb","run","and","are","saved","with","the","run","object","when","`","wandb.init","`","is","called",".","We","recommend","setting","`","wandb.config","`","once","at","the","top","of","your","training","experiment","or","setting","the","config","as","a","parameter","to","init",",","ie",".","`","wandb.init","(","config=my_config_dict",")","`","You","can","create","a","file","called","`","config-defaults.yaml","`",",","and","it","will","automatically","be","loaded","into","`","wandb.config","`",".","See","https",":","\/\/docs.wandb.com\/guides\/track\/config","#","file-based-configs",".","You","can","also","load","a","config","YAML","file","with","your","custom","name","and","pass","the","filename","into","`","wandb.init","(","config=","''","special_config.yaml","''",")","`",".","See","https",":","\/\/docs.wandb.com\/guides\/track\/config","#","file-based-configs",".","Examples",":","Basic","usage","``","`","wandb.config.epochs","=","4","wandb.init","(",")","for","x","in","range","(","wandb.config.epochs",")",":","#","train","``","`","Using","wandb.init","to","set","config","``","`","wandb.init","(","config=","{","``","epochs","''",":","4",",","``","batch_size","''",":","32","}",")","for","x","in","range","(","wandb.config.epochs",")",":","#","train","``","`","Nested","configs","``","`","wandb.config","[","'train","'","]","[","'epochs","'","]","=","4","wandb.init","(",")","for","x","in","range","(","wandb.config","[","'train","'","]","[","'epochs","'","]",")",":","#","train","``","`","Using","absl","flags","``","`","flags.DEFINE_string","(","\u2018","model","\u2019",",","None",",","\u2018","model","to","run","\u2019",")","#","name",",","default",",","help","wandb.config.update","(","flags.FLAGS",")","#","adds","all","absl","flags","to","config","``","`","Argparse","flags","``","`","python","wandb.init","(",")","wandb.config.epochs","=","4","parser","=","argparse.ArgumentParser","(",")","parser.add_argument","(","``","-b","''",",","``","--","batch-size","''",",","type=int",",","default=8",",","metavar=","''","N","''",",","help=","''","input","batch","size","for","training","(","default",":","8",")","''",",",")","args","=","parser.parse_args","(",")","wandb.config.update","(","args",")","``","`","Using","TensorFlow","flags","(","deprecated","in","tensorflow","v2",")","``","`","python","flags","=","tf.app.flags","flags.DEFINE_string","(","``","data_dir","''",",","``","\/tmp\/data","''",")","flags.DEFINE_integer","(","``","batch_size","''",",","128",",","``","Batch","size",".","''",")","wandb.config.update","(","flags.FLAGS",")","#","adds","all","of","the","tensorflow","flags","to","config","``","`"]
code: def setdefaults(self, d):
      d = wandb_helper.parse_config(d)
      # strip out keys already configured
      d = {k: v for k, v in d.items() if k not in self._items}
      d = self._sanitize_dict(d)
      self._items.update(d)
      if self._callback:
          self._callback(data=d)
  
imports: import logging
  from typing import Optional
  import wandb
  from wandb.util import _is_artifact_representation, check_dict_contains_nested_artifact, json_friendly_val
  from .None import wandb_helper
  from .lib import config_util
label_desc: Use image node_id 19 for calling the Config obj's underlying member method code with example usage: obj.setdefaults(d) without return types