Skip to content

Commit 9f84f71

Browse files
committed
fix typo
1 parent 0bf228e commit 9f84f71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/path/ckpt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False
5656

5757
def latest_checkpoint_path(dir_path, regex="G_*.pth"):
5858
f_list = glob.glob(os.path.join(dir_path, regex))
59-
latest = list(filter(lambda x: x.endswith("latest.pth"), f_list))
59+
latest = list(filter(lambda x: "latest" in x, f_list))
6060
if latest:
6161
logger.info(f"latest checkpoint in dir {dir_path} is: {latest[0]}")
6262
return latest[0]

0 commit comments

Comments
 (0)