We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bf228e commit 9f84f71Copy full SHA for 9f84f71
src/utils/path/ckpt.py
@@ -56,7 +56,7 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False
56
57
def latest_checkpoint_path(dir_path, regex="G_*.pth"):
58
f_list = glob.glob(os.path.join(dir_path, regex))
59
- latest = list(filter(lambda x: x.endswith("latest.pth"), f_list))
+ latest = list(filter(lambda x: "latest" in x, f_list))
60
if latest:
61
logger.info(f"latest checkpoint in dir {dir_path} is: {latest[0]}")
62
return latest[0]
0 commit comments