Commit 78ef5ebb authored by Shreyan Chowdhury's avatar Shreyan Chowdhury
Browse files

bug fix in config parser

parent 5a5a798c
......@@ -20,12 +20,22 @@ def run(hparams):
exp = Experiment(save_dir=CURR_RUN_PATH)
def setup_config():
def print_config():
global config
st = '---------CONFIG--------\n'
for k in config.keys():
st += k+':'+str(config.get(k))+'\n'
return st
conf = hparams.config
conf_func = globals()[conf]
try:
conf_func()
except:
logger.error(f"Config {conf} not defined")
if conf is not None:
conf_func = globals()[conf]
try:
conf_func()
except:
logger.error(f"Config {conf} not defined")
logger.info(print_config())
setup_config()
global config
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment