Skip to content

Commit 58d8c50

Browse files
authored
Update src/lightning/pytorch/callbacks/model_checkpoint.py
1 parent f6e48c0 commit 58d8c50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/pytorch/callbacks/model_checkpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ def to_yaml(self, filepath: Optional[_PATH] = None) -> None:
997997
yaml.dump(best_k, fp)
998998

999999
def file_exists(self, filepath: _PATH, trainer: "pl.Trainer") -> bool:
1000-
"""Checks if a file exists on rank 0 and broadcasts the result to all other ranks, preventing the internal
1000+
"""Checks if a file exists on rank 0 and synchronizes the result to all other ranks, preventing the internal
10011001
state to diverge between ranks."""
10021002
# In distributed setups, only global rank 0 touches the filesystem
10031003
local_decision = self._fs.exists(filepath) if trainer.is_global_zero else False

0 commit comments

Comments
 (0)