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): ...@@ -20,12 +20,22 @@ def run(hparams):
exp = Experiment(save_dir=CURR_RUN_PATH) exp = Experiment(save_dir=CURR_RUN_PATH)
def setup_config(): 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 = hparams.config
conf_func = globals()[conf] if conf is not None:
try: conf_func = globals()[conf]
conf_func() try:
except: conf_func()
logger.error(f"Config {conf} not defined") except:
logger.error(f"Config {conf} not defined")
setup_config() setup_config()
global 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