mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-02 13:59:10 +08:00
fix: saving ckpt error when ckpt folder has some folder inside (#3516)
This commit is contained in:
1 parent
cef95890f3
commit
9e5bbd9819
1 file changed
+2
-2
@@ -478,8 +478,8 @@ class Trainer:
|
|||||||
)
|
)
|
||||||
# possibly delete old checkpoints
|
# possibly delete old checkpoints
|
||||||
if self.config.save_only_latest_checkpoint:
|
if self.config.save_only_latest_checkpoint:
|
||||||
# delete everything else in the checkpoint folder
|
# delete every other checkpoint in the checkpoint folder
|
||||||
for f in self.checkpoint_dir.glob("*"):
|
for f in self.checkpoint_dir.glob("*.ckpt"):
|
||||||
if f != ckpt_path:
|
if f != ckpt_path:
|
||||||
f.unlink()
|
f.unlink()
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user