Fix missing Tuner ckpt_file (#9847)

This commit is contained in:
Glenn Jocher 2024-04-07 17:05:47 +02:00 committed by GitHub
parent 7d891a4aa4
commit 9b7a0c82fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)