Skip to content

Commit ca18da1

Browse files
committed
move dir creation to initialize checkpoint
1 parent c45592d commit ca18da1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ml_flashpoint/core/checkpoint_saver.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,9 @@ def __setstate__(self, state):
338338
@override
339339
@log_execution_time(logger=_LOGGER, name="initialize_checkpoint")
340340
def initialize_checkpoint(self, checkpoint_id: CheckpointContainerId) -> None:
341+
os.makedirs(checkpoint_id.data, exist_ok=True)
341342
self._create_dirty_checkpoint_marker(checkpoint_id)
342-
if self._local_rank_getter() == 0:
343-
os.makedirs(checkpoint_id.data, exist_ok=True)
344-
_LOGGER.info("Created checkpoint directory: '%s'", checkpoint_id.data)
343+
_LOGGER.info("Initialized checkpoint: '%s'", checkpoint_id.data)
345344

346345
@override
347346
@log_execution_time(logger=_LOGGER, name="stage_data", level=logging.INFO)

0 commit comments

Comments
 (0)