diff --git a/ultralytics/engine/tuner.py b/ultralytics/engine/tuner.py index f4fe57e7..7fc1897d 100644 --- a/ultralytics/engine/tuner.py +++ b/ultralytics/engine/tuner.py @@ -218,7 +218,7 @@ class Tuner: for ckpt in weights_dir.glob("*.pt"): shutil.copy2(ckpt, self.tune_dir / "weights") elif cleanup: - shutil.rmtree(ckpt_file.parent) # remove iteration weights/ dir to reduce storage space + shutil.rmtree(weights_dir, ignore_errors=True) # remove iteration weights/ dir to reduce storage space # Plot tune results plot_tune_results(self.tune_csv)