Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
suchenzang committed Mar 13, 2023
1 parent 7db60a8 commit da2b120
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions metaseq/checkpoint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ def save_checkpoint(
async_callback_fn=async_callback_fn if save_to_NFS else None,
)

if len(checkpoints) > 1:
# Create symlink between identical checkpoints (differing in naming for epoch/update/last).
for other_checkpoint in checkpoints[1:]:
if PathManager.islink(other_checkpoint):
PathManager.rm(other_checkpoint)
assert PathManager.symlink(
checkpoints[0], other_checkpoint
), f"Failed to symlink {checkpoints[0]} to {other_checkpoint}"
# if len(checkpoints) > 1:
# # Create symlink between identical checkpoints (differing in naming for epoch/update/last).
# for other_checkpoint in checkpoints[1:]:
# if PathManager.islink(other_checkpoint):
# PathManager.rm(other_checkpoint)
# assert PathManager.symlink(
# checkpoints[0], other_checkpoint
# ), f"Failed to symlink {checkpoints[0]} to {other_checkpoint}"

write_timer.stop()
logger.info(
Expand Down

0 comments on commit da2b120

Please sign in to comment.