Skip to content

Commit

Permalink
remove flush on close (mosaicml#2646)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpatel2000 authored Oct 16, 2023
1 parent 00ad78d commit 5dff730
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions composer/callbacks/checkpoint_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,6 @@ def epoch_checkpoint(self, state: State, logger: Logger):
logger,
)

def close(self, state: State, logger: Logger):
trained_at_least_one_batch = self.start_batch is not None and self.start_batch != state.timestamp.batch
if self.last_checkpoint_batch != state.timestamp.batch and trained_at_least_one_batch:
self._save_checkpoint(
state,
logger,
)

def get_state_dict(self, state):
return {
'state': state.state_dict(),
Expand Down

0 comments on commit 5dff730

Please sign in to comment.