(config_path)
return config
Parses a Gin config into a dictionary. All values are strings.
Parses a Gin config into a dictionary. All values are strings.
Parses a Gin config into a dictionary . All values are strings .
def _parse_gin_config(config_path):
  """Parses a Gin config into a dictionary. All values are strings."""
  with tf.gfile.Open(config_path) as f:
    config_str = f.read()
  parser = gin.config_parser.ConfigParser(config_str, _DummyParserDelegate())
  config = {}
  for statement in parser:
    if not isinstance(statement, gin.config_parser.ImportStatement):
      name = statement.scope + "/" if statement.scope else ""
      name = statement.selector + "." + statement.arg_name
      config[name] = statement.value
  return config
def _parse_gin_config ( config_path ) : with tf . gfile . Open ( config_path ) as f : config_str = f . read ( ) parser = gin . config_parser . ConfigParser ( config_str , _DummyParserDelegate ( ) ) config = { } for statement in parser : if not isinstance ( statement , gin . config_parser . ImportStatement ) : name = statement . scope + "/" if statement . scope else "" name = statement . selector + "." + statement . arg_name config [ name ] = statement . value return config