Fix dir_exits error

This commit is contained in:
litagin02
2024-01-12 13:43:29 +09:00
parent 1067b8ec60
commit a8e0619ad4
2 changed files with 2 additions and 1 deletions

View File

@@ -65,6 +65,7 @@ def initialize(model_name, batch_size, epochs, save_every_steps, bf16_run):
shutil.copytree(
src=model_path,
dst=os.path.join(dataset_path, "models_backup"),
dirs_exist_ok=True,
)
shutil.rmtree(model_path)
try: