Skip to content

Commit

Permalink
fix(python): do not fail if checkpoints path exist (#305)
Browse files Browse the repository at this point in the history
Co-authored-by: root <root@bjlt-hg96.sy>
  • Loading branch information
liuhatry and root authored Oct 18, 2021
1 parent 6afcab3 commit d600dcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bagua/torch_api/checkpoint/checkpointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _has_moe_layers(model: BaguaModule) -> Tuple[bool, int]:
def _ensure_directory_exists(filename: str):
dirname = os.path.dirname(filename)
if not os.path.exists(dirname):
os.makedirs(dirname)
os.makedirs(dirname, exist_ok=True)


def _get_optimizer_ckpt_name(
Expand Down

0 comments on commit d600dcd

Please sign in to comment.