Repository navigation
Conversation
As I prepare the refactor cli.train to core.train with cli and api shims in every submodule, I also want to bring StyleTTS2 a little closer to our standard where that makes sense.
roedoejet
left a comment
There was a problem hiding this comment.
Generally looks good, same vein as the preprocess refactor. I think the model dump needs to be addressed and a couple other minor things. Also, my comment on the preprocess PR about sys.exit also applies here.
| shutil.copy(config_file_s, os.path.join(log_dir, config_file_s)) | ||
| # Log the full in-memory config object as really used, including any | ||
| # --config-args overrides on the CLI or programmatic changes to config | ||
| with open( |
There was a problem hiding this comment.
I don't think we can yaml.dump here because that will miss the pydantic logic we have for exporting functions and paths correctly which is why we use config.model_dump_json() instead of model_dump(). Is there a reason not to use the base_cli.helpers.save_configuration_to_log_dir though? I think it would be good to use that fn across all train commands for all models.
| os.makedirs(log_dir, exist_ok=True) | ||
| if config_file is not None: | ||
| config_file_s = str(config_file) | ||
| shutil.copy(config_file_s, os.path.join(log_dir, config_file_s)) |
There was a problem hiding this comment.
Hm, shouldn't this be os.path.join(log_dir, Path(config_file).name) or something similar? The old code was:
shutil.copy(str(config_file), os.path.join(log_dir, config_file.name))
EveryVoiceTTS/EveryVoice#893