Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mihir Patel <mihir.v.patel7@gmail.com>
  • Loading branch information
bigning and mvpatel2000 authored Sep 10, 2024
1 parent 991323c commit 7c191d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions composer/utils/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ def dist_cp_load(
):
if version.parse(torch.__version__) >= version.parse('2.4.0'):
if version.parse(torch.__version__) < version.parse('2.4.1'):
# PyTorch 2.4.0
from torch.distributed.checkpoint.utils import CheckpointException
try:
dist_cp.load(
Expand Down Expand Up @@ -645,6 +646,7 @@ def dist_cp_load(
else:
raise e
else:
# PyTorch 2.4.1
dist_cp.load(
state_dict=state_dict,
storage_reader=storage_reader,
Expand Down

0 comments on commit 7c191d8

Please sign in to comment.