From 2b2cecaea284b1cce4184ede547456f63e2ac3c9 Mon Sep 17 00:00:00 2001 From: Edresson Date: Mon, 22 Nov 2021 09:25:32 -0300 Subject: [PATCH] Set the new_fields in copy_model_files as None by default --- TTS/trainer.py | 4 ++-- TTS/utils/io.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TTS/trainer.py b/TTS/trainer.py index c151e716..b9026c8e 100644 --- a/TTS/trainer.py +++ b/TTS/trainer.py @@ -202,7 +202,7 @@ class Trainer: os.makedirs(output_path, exist_ok=True) # copy training assets to the output folder - copy_model_files(config, output_path, new_fields=None) + copy_model_files(config, output_path) # init class members self.args = args @@ -274,7 +274,7 @@ class Trainer: self.config.num_languages = self.model.language_manager.num_languages # update config file - copy_model_files(self.config, self.output_path, None) + copy_model_files(self.config, self.output_path) # setup criterion self.criterion = self.get_criterion(self.model) diff --git a/TTS/utils/io.py b/TTS/utils/io.py index a93f6118..54818ce9 100644 --- a/TTS/utils/io.py +++ b/TTS/utils/io.py @@ -26,7 +26,7 @@ class AttrDict(dict): self.__dict__ = self -def copy_model_files(config: Coqpit, out_path, new_fields): +def copy_model_files(config: Coqpit, out_path, new_fields=None): """Copy config.json and other model files to training folder and add new fields.