From f161045675da3182ced5fc87e51706157dd7f951 Mon Sep 17 00:00:00 2001 From: Manan Goel Date: Fri, 15 Apr 2022 09:44:42 +0000 Subject: [PATCH] Fixed bug to check if 'use_wandb' and 'use_visualdl' flags are addded or not --- tools/program.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/program.py b/tools/program.py index b65e9188..72fca148 100755 --- a/tools/program.py +++ b/tools/program.py @@ -560,12 +560,12 @@ def preprocess(is_train=False): loggers = [] - if config['Global']['use_visualdl']: + if 'use_visualdl' in config['Global'] and config['Global']['use_visualdl']: save_model_dir = config['Global']['save_model_dir'] vdl_writer_path = '{}/vdl/'.format(save_model_dir) log_writer = VDLLogger(save_model_dir) loggers.append(log_writer) - if config['Global']['use_wandb'] or 'wandb' in config: + if ('use_wandb' in config['Global'] and config['Global']['use_wandb']) or 'wandb' in config: save_dir = config['Global']['save_model_dir'] wandb_writer_path = "{}/wandb".format(save_dir) if "wandb" in config: -- GitLab