Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally load trainer state #573

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

Muennighoff
Copy link
Collaborator

@Muennighoff Muennighoff commented May 13, 2024

I may be missing some nuances with the checkpointing but can we do sth akin to this PR to avoid trying to load the trainer state when the file is not present? Currently, I get FileNotFoundErrors when I try to load a CKPT where I only have the model file.

@Muennighoff Muennighoff requested a review from epwalsh May 13, 2024 05:53
Copy link
Member

@epwalsh epwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just need to update the type hints for the return value.

olmo/checkpoint.py Outdated Show resolved Hide resolved
Co-authored-by: Pete <[email protected]>
olmo/checkpoint.py Outdated Show resolved Hide resolved
olmo/checkpoint.py Outdated Show resolved Hide resolved
olmo/checkpoint.py Outdated Show resolved Hide resolved
olmo/checkpoint.py Outdated Show resolved Hide resolved
@Muennighoff
Copy link
Collaborator Author

Type checks are still failing --- do you understand why?

@epwalsh
Copy link
Member

epwalsh commented May 13, 2024

Type checks are still failing --- do you understand why?

Looks like you'll need to assert trainer_state is not None in the Trainer when load_trainer_state=True.

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.

2 participants