INNER CODE UNIT · Python
create_default_config
TimoBolkart/voca · config_parser.py:85
def create_default_config(fname):
config = configparser.ConfigParser()
set_default_paramters(config)
with open(fname, 'w') as configfile:
config.write(configfile)
configfile.close()
def read_config(fname):
if not os.path.exists(fname):
print('Config not found %s' % fname)
return
config = configparser.RawConfigParser()
config.read(fname)
config_parms = {}
config_parms['checkpoint_dir'] = config.get('Input Output', 'checkpoint_dir')