RL4LMs icon indicating copy to clipboard operation
RL4LMs copied to clipboard

Fix IndexError when loading checkpoints

Open Runingtime opened this issue 1 year ago • 0 comments

In line104-105 of rl4lms/envs/text_generation/warm_start.py, an IndexError occurs if there exists filenames that do not contain "_", here is the crash:

 key=lambda ckpt: int(ckpt.split("_")[1]))
IndexError: list index out of range

Fixed by filtering filenames.

Runingtime avatar May 31 '23 07:05 Runingtime