-
Notifications
You must be signed in to change notification settings - Fork 53
BUG: --result_folder Deletion #30
Copy link
Copy link
Open
Description
Description
The --result_folder deletes previous folder without warning.
if os.path.exists(opt.result_folder):
shutil.rmtree(opt.result_folder)
os.makedirs(opt.result_folder)
So if you happen to want to save your results in the same folder as your checkpoint weights, you delete it instead. This is incredibly risky behavior.
Recommendation
Confirm deletion before doing so with:
if os.path.exists(opt.result_folder):
print(f"About to delete: {opt.result_folder}")
input("Press Enter to confirm...")
shutil.rmtree(opt.result_folder)
os.makedirs(opt.result_folder)
OR, just don't delete the folder in the first place.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels