Save tb_logger to alt_path

This commit is contained in:
James Betker 2020-08-26 17:45:07 -06:00
parent 8a6a2e6e2e
commit b593d8e7c3

View File

@ -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.')