From 363de47f08e395434629d94a3945ff747e8ed7d2 Mon Sep 17 00:00:00 2001 From: itasli Date: Tue, 27 Jun 2023 07:40:35 +0000 Subject: [PATCH 1/2] fix undefined save_model_dir when using wand --- tools/program.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/program.py b/tools/program.py index a8373435c2..80ecb0c1aa 100755 --- a/tools/program.py +++ b/tools/program.py @@ -679,8 +679,8 @@ def preprocess(is_train=False): loggers.append(log_writer) 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) + save_model_dir = config['Global']['save_model_dir'] + wandb_writer_path = "{}/wandb".format(save_model_dir) if "wandb" in config: wandb_params = config['wandb'] else: From dbe56d04c8dd66724f46968dcd884ae81d672267 Mon Sep 17 00:00:00 2001 From: itasli Date: Thu, 29 Jun 2023 10:05:05 +0000 Subject: [PATCH 2/2] Update program.py --- tools/program.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/program.py b/tools/program.py index 80ecb0c1aa..209212fde1 100755 --- a/tools/program.py +++ b/tools/program.py @@ -679,13 +679,13 @@ def preprocess(is_train=False): loggers.append(log_writer) if ('use_wandb' in config['Global'] and config['Global']['use_wandb']) or 'wandb' in config: - save_model_dir = config['Global']['save_model_dir'] - wandb_writer_path = "{}/wandb".format(save_model_dir) + save_dir = config['Global']['save_model_dir'] + wandb_writer_path = "{}/wandb".format(save_dir) if "wandb" in config: wandb_params = config['wandb'] else: wandb_params = dict() - wandb_params.update({'save_dir': save_model_dir}) + wandb_params.update({'save_dir': save_dir}) log_writer = WandbLogger(**wandb_params, config=config) loggers.append(log_writer) else: