jiupinjia/rocket-recycling

cannot load the latest training model when restart the training progress

Opened this issue · 1 comments

It seems 'glob.glob()' will not fetch the sorted list ,
this following code cannot load the latest training model . At least it occurred in my laptop.

checkpoint = torch.load(glob.glob(os.path.join(ckpt_folder, '*.pt'))[-1])

I have to sort the list explicitly, so I changed it to this

checkpoint = torch.load(sorted(glob.glob(os.path.join(ckpt_folder, '*.pt')))[-1])

FYI

@alalan, thank you for your feedback. In this link you may have the solution. I will fix it in my next update. Thank you!