Skip to content

Commit

Permalink
Update composer/trainer/_patch_pytorch.py
Browse files Browse the repository at this point in the history
Co-authored-by: Mihir Patel <[email protected]>
  • Loading branch information
bigning and mvpatel2000 authored Sep 10, 2024
1 parent 2664be4 commit f5e0398
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion composer/trainer/_patch_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,9 @@ def unshard_with_sync(self):
self._use_unsharded_flat_param(padded_unsharded_flat_param)


if version.parse(torch.__version__) == version.parse('2.4.0'):
if version.parse(torch.__version__) >= version.parse('2.4.0') and version.parse(
torch.__version__,
) < version.parse('2.4.1'):
# 2.4.0 only patch
# PyTorch issue: https://github.com/pytorch/pytorch/issues/133923
from torch.distributed.checkpoint.metadata import STATE_DICT_TYPE
Expand Down

0 comments on commit f5e0398

Please sign in to comment.