From be0c5098fd8e4e983cdefe18667e4c94b046eb0b Mon Sep 17 00:00:00 2001 From: TianYuan Date: Mon, 27 Sep 2021 07:30:22 +0000 Subject: [PATCH] add copy conf for transformer_tts --- examples/transformer_tts/ljspeech/train.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/transformer_tts/ljspeech/train.py b/examples/transformer_tts/ljspeech/train.py index be5cc36c..1af5a5e3 100644 --- a/examples/transformer_tts/ljspeech/train.py +++ b/examples/transformer_tts/ljspeech/train.py @@ -15,6 +15,7 @@ import argparse import os import logging +import shutil from pathlib import Path import jsonlines @@ -198,8 +199,11 @@ def main(): if args.device == "cpu" and args.nprocs > 1: raise RuntimeError("Multiprocess training on CPU is not supported.") config = get_cfg_default() + config_name = args.config.split("/")[-1] if args.config: config.merge_from_file(args.config) + # copy conf to output_dir + shutil.copyfile(args.config, Path(args.output_dir) / config_name) print("========Args========") print(yaml.safe_dump(vars(args)))