Skip to content

Fix IndexError when loading checkpoints#58

Open
Runingtime wants to merge 1 commit into
allenai:mainfrom
Runingtime:main
Open

Fix IndexError when loading checkpoints#58
Runingtime wants to merge 1 commit into
allenai:mainfrom
Runingtime:main

Conversation

@Runingtime

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant