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

Skip extra dataset state load #3393

Merged

Conversation

mvpatel2000
Copy link
Contributor

What does this PR do?

Skip extra dataset state load. Previously, if loading a checkpoint with train_dataloader, we would first load the dataset_state on load. After loading, if we again set train_dataloader, it would call load_state_dict with a state_dict that had a value of None. This fixes the check on the setter of train_dataloader to properly skip the extra load.

@mvpatel2000 mvpatel2000 requested review from snarayan21 and b-chu June 10, 2024 15:54
Copy link
Contributor

@snarayan21 snarayan21 left a comment

Choose a reason for hiding this comment

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

makes sense to me if I'm understanding this right. couple comments. thanks!

composer/core/state.py Show resolved Hide resolved
composer/core/state.py Show resolved Hide resolved
@snarayan21 snarayan21 self-requested a review June 11, 2024 18:12
Copy link
Contributor

@snarayan21 snarayan21 left a comment

Choose a reason for hiding this comment

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

lgtm

@mvpatel2000 mvpatel2000 merged commit 832f17d into mosaicml:dev Jun 11, 2024
17 checks passed
@mvpatel2000 mvpatel2000 deleted the mvpatel2000/cleanup-dataset-state branch June 11, 2024 18:25
mvpatel2000 added a commit to mvpatel2000/composer that referenced this pull request Jul 21, 2024
mvpatel2000 added a commit that referenced this pull request Jul 21, 2024
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