Upload all Data/ to hub
This commit is contained in:
18
train_ms.py
18
train_ms.py
@@ -171,6 +171,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)
|
||||
|
||||
@@ -489,8 +499,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,
|
||||
)
|
||||
@@ -790,8 +800,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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user