4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

fix: saving ckpt error when ckpt folder has some folder inside (#3516)

This commit is contained in:
Lei Lei 2024-11-08 17:44:39 -05:00 committed by GitHub
parent cef95890f3
commit 9e5bbd9819
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -478,8 +478,8 @@ class Trainer:
)
# possibly delete old checkpoints
if self.config.save_only_latest_checkpoint:
# delete everything else in the checkpoint folder
for f in self.checkpoint_dir.glob("*"):
# delete every other checkpoint in the checkpoint folder
for f in self.checkpoint_dir.glob("*.ckpt"):
if f != ckpt_path:
f.unlink()