From a04e569c86cfd73898142c1c0a4f6509b35090fe Mon Sep 17 00:00:00 2001 From: litagin02 Date: Tue, 20 Feb 2024 00:42:00 +0900 Subject: [PATCH] Fix and upload all Data/ to hub --- preprocess_all.py | 1 - train_ms_jp_extra.py | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/preprocess_all.py b/preprocess_all.py index 954af0b..679abb2 100644 --- a/preprocess_all.py +++ b/preprocess_all.py @@ -87,5 +87,4 @@ if __name__ == "__main__": use_jp_extra=args.use_jp_extra, val_per_lang=args.val_per_lang, log_interval=args.log_interval, - skip_invalid=args.skip_invalid, ) diff --git a/train_ms_jp_extra.py b/train_ms_jp_extra.py index 75e72c5..f53d401 100644 --- a/train_ms_jp_extra.py +++ b/train_ms_jp_extra.py @@ -175,6 +175,16 @@ def run(): os.path.join(config.out_dir, "style_vectors.npy"), ) + if args.repo_id is not None: + # Upload Dataset + api.upload_folder( + repo_id=hps.repo_id, + folder_path=config.dataset_path, + path_in_repo=f"Data/{config.model_name}", + delete_patterns="*.pth", + run_as_future=True, + ) + torch.manual_seed(hps.train.seed) torch.cuda.set_device(local_rank) @@ -577,8 +587,8 @@ def run(): if hps.repo_id is not None: future1 = api.upload_folder( repo_id=hps.repo_id, - folder_path=model_dir, - path_in_repo=f"Data/{config.model_name}/models", + folder_path=config.dataset_path, + path_in_repo=f"Data/{config.model_name}", delete_patterns="*.pth", run_as_future=True, ) @@ -947,8 +957,8 @@ def train_and_evaluate( if hps.repo_id is not None: api.upload_folder( repo_id=hps.repo_id, - folder_path=hps.model_dir, - path_in_repo=f"Data/{config.model_name}/models", + folder_path=config.dataset_path, + path_in_repo=f"Data/{config.model_name}", delete_patterns="*.pth", run_as_future=True, )