(name, overrides=None)
return cfg, summary
Instantiates a config object by name.

  Args:
    name: Config name (see _named_configs)
    overrides: Comma-separated list of overrides e.g. "a=1,b=2"

  Returns:
    cfg: The config object
    summary: Text summary of all params in config
Instantiates a config object by name.
Instantiates a config object by name .
def get_named_config(name, overrides=None):
  """Instantiates a config object by name.

  Args:
    name: Config name (see _named_configs)
    overrides: Comma-separated list of overrides e.g. "a=1,b=2"

  Returns:
    cfg: The config object
    summary: Text summary of all params in config
  """
  cfg = _named_configs[name]

  if overrides is not None and overrides.strip():
    overrides = [p.split("=") for p in six.ensure_str(overrides).split(",")]
    for key, val in overrides:
      val_type = type(getattr(cfg, key))
      if val_type == bool:
        setattr(cfg, key, val in ["True", "true", "t", "1"])
      elif val_type == list:
        setattr(cfg, key, val.split(";"))
      else:
        setattr(cfg, key, val_type(val))

  summary = "\n".join([
      "{},{}".format(k, v)
      for k, v in sorted(list(vars(cfg).items()), key=lambda x: x[0])
  ])

  return cfg, summary
def get_named_config ( name , overrides = None ) : cfg = _named_configs [ name ] if overrides is not None and overrides . strip ( ) : overrides = [ p . split ( "=" ) for p in six . ensure_str ( overrides ) . split ( "," ) ] for key , val in overrides : val_type = type ( getattr ( cfg , key ) ) if val_type == bool : setattr ( cfg , key , val in [ "True" , "true" , "t" , "1" ] ) elif val_type == list : setattr ( cfg , key , val . split ( ";" ) ) else : setattr ( cfg , key , val_type ( val ) ) summary = "\n" . join ( [ "{},{}" . format ( k , v ) for k , v in sorted ( list ( vars ( cfg ) . items ( ) ) , key = lambda x : x [ 0 ] ) ] ) return cfg , summary