From 49434901d8326d8bd6ca741b7c73232885596fc0 Mon Sep 17 00:00:00 2001 From: Chengjia Jiang <46401978+ChasonJiang@users.noreply.github.com> Date: Tue, 16 Jan 2024 19:30:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=9A=E6=98=BE=E5=8D=A1=E8=AE=AD?= =?UTF-8?q?=E7=BB=83=E6=97=B6logger=E6=9C=AA=E8=B5=8B=E5=80=BC=E5=BC=95?= =?UTF-8?q?=E7=94=A8=20(#1722)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit modified: infer/modules/train/train.py --- .gitignore | 5 +++++ infer/modules/train/train.py | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 65916c7..683bdfc 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,8 @@ rmvpe.pt # To set a Python version for the project .tool-versions + +/runtime +/assets/weights/* +ffmpeg.* +ffprobe.* \ No newline at end of file diff --git a/infer/modules/train/train.py b/infer/modules/train/train.py index ab6ba2d..c0ca0f6 100644 --- a/infer/modules/train/train.py +++ b/infer/modules/train/train.py @@ -104,10 +104,11 @@ def main(): os.environ["MASTER_ADDR"] = "localhost" os.environ["MASTER_PORT"] = str(randint(20000, 55555)) children = [] + logger = utils.get_logger(hps.model_dir) for i in range(n_gpus): subproc = mp.Process( target=run, - args=(i, n_gpus, hps), + args=(i, n_gpus, hps, logger), ) children.append(subproc) subproc.start() @@ -120,10 +121,11 @@ def run( rank, n_gpus, hps, + logger: logging.Logger ): global global_step if rank == 0: - logger = utils.get_logger(hps.model_dir) + # logger = utils.get_logger(hps.model_dir) logger.info(hps) # utils.check_git_hash(hps.model_dir) writer = SummaryWriter(log_dir=hps.model_dir)