fix(init): allow resume_tb_folder is an empty string (#391)

pull/418/head
Guoteng 2023-10-13 16:46:14 +08:00 committed by GitHub
parent 71a0388b87
commit 37e0c86e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ def init_tb_writer(
# dir of the last task by 'make_launch_script.sh'.
# If we load ckpt, 'resume_tb_folder' will be overwritten as the
# reloaded 'train_state.resume_tb_folder'.s
if resume_tb_folder is not None:
assert len(resume_tb_folder) > 0 and resume_tb_folder != "/"
if resume_tb_folder is not None and len(resume_tb_folder) > 0:
assert resume_tb_folder != "/"
if not os.path.exists(resume_tb_folder):
logger.error(
f"Can't found resume_tb_folder{resume_tb_folder}, \