Skip to content

Commit

Permalink
Pin checkpoint state dict flattening patch (mosaicml#3700)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-chu authored Nov 4, 2024
1 parent 969d3b1 commit 03c992b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composer/utils/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,10 @@ def dist_cp_load(
storage_reader: StorageReader,
load_planner: Optional[LoadPlanner] = None,
):
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.5.0')
):
from torch.distributed.checkpoint.utils import CheckpointException
try:
dist_cp.load(
Expand Down

0 comments on commit 03c992b

Please sign in to comment.