Skip to content

Commit

Permalink
init vals for window size, loss window, loss cap
Browse files Browse the repository at this point in the history
  • Loading branch information
joyce-chen-uni committed Aug 25, 2024
1 parent 1b5a757 commit fff5576
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llmfoundry/callbacks/kill_loss_spike_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def __init__(
self.patience = patience
self.outlier_multiplier = outlier_multiplier
self.outlier_counter = 0
self.window_size = None
self.loss_window = None
self.loss_cap = None
self.window_size = MIN_WINDOW_SIZE
self.loss_window = deque(maxlen=self.window_size)
self.loss_cap = float('inf')

def detect_loss_spike(self, train_loss: float, running_loss_avg: float):
# Train loss is an outlier
Expand Down

0 comments on commit fff5576

Please sign in to comment.