Skip to content

Commit

Permalink
Remove hardcoded const
Browse files Browse the repository at this point in the history
  • Loading branch information
joyce-chen-uni committed Aug 21, 2024
1 parent 88a5417 commit 45eaa0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llmfoundry/callbacks/kill_loss_spike_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def batch_end(self, state: State, logger: Logger) -> None:
self.outlier_counter = 0

# Half of the running losses are greater than our "high loss" threshold, after the first window
elif state.timestamp.batch >= 200 and (sum(1 for loss in self.loss_window if loss > self.loss_cap) >= self.window_size / 2):
elif (state.timestamp.batch >= self.window_size * 2) and (sum(1 for loss in self.loss_window if loss > self.loss_cap) >= self.window_size / 2):
log.info(f'High losses >{self.loss_cap} detected.')
for destination in logger.destinations:
if isinstance(destination, MosaicMLLogger):
Expand Down

0 comments on commit 45eaa0e

Please sign in to comment.