fix to log with logging_dir without log_with

This commit is contained in:
Kohya S
2023-04-23 19:15:48 +09:00
parent 9ba4c3edca
commit 46cbae088e

View File

@@ -2758,7 +2758,10 @@ def prepare_accelerator(args: argparse.Namespace):
logging_dir = args.logging_dir + "/" + log_prefix + time.strftime("%Y%m%d%H%M%S", time.localtime())
if args.log_with is None:
log_with = None
if logging_dir is not None:
log_with = "tensorboard"
else:
log_with = None
else:
log_with = args.log_with
if log_with in ["tensorboard", "all"]: