more agressive remove folder

This commit is contained in:
erogol 2020-05-12 14:09:16 +02:00
parent 3b2d726e2d
commit 0ec42fa279
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ def remove_experiment_folder(experiment_path):
checkpoint_files = glob.glob(experiment_path + "/*.pth.tar")
if not checkpoint_files:
if os.path.exists(experiment_path):
shutil.rmtree(experiment_path)
shutil.rmtree(experiment_path, ignore_errors=True)
print(" ! Run is removed from {}".format(experiment_path))
else:
print(" ! Run is kept in {}".format(experiment_path))