RL4LMs
RL4LMs copied to clipboard
Fix IndexError when loading checkpoints
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.