Fix and upload all Data/ to hub
This commit is contained in:
@@ -87,5 +87,4 @@ if __name__ == "__main__":
|
|||||||
use_jp_extra=args.use_jp_extra,
|
use_jp_extra=args.use_jp_extra,
|
||||||
val_per_lang=args.val_per_lang,
|
val_per_lang=args.val_per_lang,
|
||||||
log_interval=args.log_interval,
|
log_interval=args.log_interval,
|
||||||
skip_invalid=args.skip_invalid,
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -175,6 +175,16 @@ def run():
|
|||||||
os.path.join(config.out_dir, "style_vectors.npy"),
|
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.manual_seed(hps.train.seed)
|
||||||
torch.cuda.set_device(local_rank)
|
torch.cuda.set_device(local_rank)
|
||||||
|
|
||||||
@@ -577,8 +587,8 @@ def run():
|
|||||||
if hps.repo_id is not None:
|
if hps.repo_id is not None:
|
||||||
future1 = api.upload_folder(
|
future1 = api.upload_folder(
|
||||||
repo_id=hps.repo_id,
|
repo_id=hps.repo_id,
|
||||||
folder_path=model_dir,
|
folder_path=config.dataset_path,
|
||||||
path_in_repo=f"Data/{config.model_name}/models",
|
path_in_repo=f"Data/{config.model_name}",
|
||||||
delete_patterns="*.pth",
|
delete_patterns="*.pth",
|
||||||
run_as_future=True,
|
run_as_future=True,
|
||||||
)
|
)
|
||||||
@@ -947,8 +957,8 @@ def train_and_evaluate(
|
|||||||
if hps.repo_id is not None:
|
if hps.repo_id is not None:
|
||||||
api.upload_folder(
|
api.upload_folder(
|
||||||
repo_id=hps.repo_id,
|
repo_id=hps.repo_id,
|
||||||
folder_path=hps.model_dir,
|
folder_path=config.dataset_path,
|
||||||
path_in_repo=f"Data/{config.model_name}/models",
|
path_in_repo=f"Data/{config.model_name}",
|
||||||
delete_patterns="*.pth",
|
delete_patterns="*.pth",
|
||||||
run_as_future=True,
|
run_as_future=True,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user