Skip to content

Commit

Permalink
Auto create dir when merging FSDP weights (#2854)
Browse files Browse the repository at this point in the history
  • Loading branch information
helloworld1 authored Jun 13, 2024
1 parent 5f9235a commit 91a2599
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/accelerate/utils/fsdp_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def _distributed_checkpoint_to_merged_weights(checkpoint_dir: str, save_path: st
"""
state_dict = {}
save_path = Path(save_path)
save_path.mkdir(exist_ok=True)
dist_cp_format_utils._load_state_dict(
state_dict,
storage_reader=dist_cp.FileSystemReader(checkpoint_dir),
Expand Down

0 comments on commit 91a2599

Please sign in to comment.