mirror of https://github.com/coqui-ai/TTS.git
Update trainer's initialization
This commit is contained in:
parent
fcbfc53cb7
commit
b4b890df03
|
@ -182,16 +182,24 @@ class Trainer:
|
||||||
- TPU training
|
- TPU training
|
||||||
- NOTE: Consider moving `training_assets` to the model implementation.
|
- NOTE: Consider moving `training_assets` to the model implementation.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if parse_command_line_args:
|
if parse_command_line_args:
|
||||||
# parse command-line arguments for TrainingArgs()
|
# parse command-line arguments for TrainerArgs()
|
||||||
args, coqpit_overrides = self.parse_argv(args)
|
args, coqpit_overrides = self.parse_argv(args)
|
||||||
|
|
||||||
# get ready for training and parse command-line arguments for the model config
|
# get ready for training and parse command-line arguments for the model config
|
||||||
config = self.init_training(args, coqpit_overrides, config)
|
config = self.init_training(args, coqpit_overrides, config)
|
||||||
|
|
||||||
# define the experiment path and create the folder
|
# set the output path
|
||||||
output_path = get_experiment_folder_path(config.output_path, config.run_name)
|
if args.continue_path:
|
||||||
os.makedirs(output_path, exist_ok=True)
|
# use the same path as the continuing run
|
||||||
|
output_path = args.continue_path
|
||||||
|
else:
|
||||||
|
# override the output path if it is provided
|
||||||
|
output_path = config.output_path if output_path is None else output_path
|
||||||
|
# create a new output folder name
|
||||||
|
output_path = get_experiment_folder_path(config.output_path, config.run_name)
|
||||||
|
os.makedirs(output_path, exist_ok=True)
|
||||||
|
|
||||||
# copy training assets to the output folder
|
# copy training assets to the output folder
|
||||||
copy_model_files(config, output_path, new_fields=None)
|
copy_model_files(config, output_path, new_fields=None)
|
||||||
|
|
Loading…
Reference in New Issue