From b593d8e7c3f1a65ddaef31b80d68b1c3381af238 Mon Sep 17 00:00:00 2001 From: James Betker Date: Wed, 26 Aug 2020 17:45:07 -0600 Subject: [PATCH] Save tb_logger to alt_path --- codes/train.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codes/train.py b/codes/train.py index 4c3e8761..dd16ebd8 100644 --- a/codes/train.py +++ b/codes/train.py @@ -277,6 +277,10 @@ def main(): logger.info('Saving models and training states.') model.save(current_step) model.save_training_state(epoch, current_step) + if 'alt_path' in opt['path'].keys(): + import shutil + print("Synchronizing tb_logger to alt_path..") + shutil.copytree(tb_logger_path, opt['path']['alt_path']) if rank <= 0: logger.info('Saving the final model.')