Set the new_fields in copy_model_files as None by default

This commit is contained in:
Edresson 2021-11-22 09:25:32 -03:00 committed by Eren Gölge
parent 34749f8727
commit 2b2cecaea2
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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.