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:
parent
cef95890f3
commit
9e5bbd9819
@ -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()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user