checkpoint_commit_sha = list(checkpoint_dirpath.glob(".commit-*"))
if len(checkpoint_commit_sha) == 0:
raise UserWarning(
"Commit SHA was not recorded while saving checkpoints."
)
else:
// verify commit sha, raise warning if it doesn"t match
commit_sha_subprocess = Popen(
["git", "rev-parse", "--short", "HEAD"], stdout=PIPE, stderr=PIPE
After Change
checkpoint_commit_sha = list(checkpoint_dirpath.glob(".commit-*"))
if len(checkpoint_commit_sha) == 0:
warnings.warn(
"Commit SHA was not recorded while saving checkpoints."
)
else:
// verify commit sha, raise warning if it doesn"t match
commit_sha_subprocess = Popen(
["git", "rev-parse", "--short", "HEAD"], stdout=PIPE, stderr=PIPE