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

Add offset and length arguments for checkpoint validation functions #3246

Merged
merged 10 commits into from
May 3, 2024

Conversation

irenedea
Copy link
Contributor

@irenedea irenedea commented May 2, 2024

Enables passing a list of offset and lengths to checkpoint validation functions. This enables validation functions to closely mimic the behavior of torch sharded checkpoint loading.

Manual Test

checkpoint-validation-finetuning-load-all-ybefFB (loads weights and optimizer state)
checkpoint-validation-finetuning-CztzA5 (loads weights only)
checkpoint-validation-finetuning-autoresume-Lmr4Kd (autoresume)

@irenedea irenedea requested a review from mvpatel2000 May 2, 2024 02:19
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

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

Can you add a unit test?

Copy link
Contributor

@dakinggg dakinggg left a comment

Choose a reason for hiding this comment

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

lgtm, do as you see fit, but please remove the logging of all the specs in some form or another.

composer/utils/checkpoint.py Outdated Show resolved Hide resolved
composer/utils/checkpoint.py Outdated Show resolved Hide resolved
composer/utils/checkpoint.py Outdated Show resolved Hide resolved
@irenedea irenedea enabled auto-merge (squash) May 2, 2024 22:12
@irenedea irenedea disabled auto-merge May 2, 2024 22:12
@irenedea irenedea merged commit 2c0d039 into mosaicml:dev May 3, 2024
15 checks passed
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.

3 participants