mosaicml / composer

Supercharge Your Model Training
http://docs.mosaicml.com
Apache License 2.0
5.06k stars 407 forks source link

Skip extra dataset state load #3393

Closed mvpatel2000 closed 2 weeks ago

mvpatel2000 commented 2 weeks ago

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.