Skip to content

Commit

Permalink
edit docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
joyce-chen-uni committed Aug 21, 2024
1 parent e160e21 commit 39fdbfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llmfoundry/callbacks/kill_loss_spike_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

class KillLossSpike(Callback):
"""
A callback for detecting and handling loss spikes or persistently high training losses during model training.
This callback detects and handles loss spikes or persistently high training losses during model training.
Monitors the training loss at the end of each batch and maintains a rolling window of recent losses.
If recent training losses exceed a specified cap or if a significant spike in loss is detected, the callback can either
log a warning (displayed as a message on the run event) or raise a LossSpikeError to stop the run without retry.
Parameters:
Args:
log_only (bool): If True, the callback will only log warnings without interrupting training. If False, a
LossSpikeError will be raised to stop training upon detecting a loss spike or persistently
high loss.
Expand Down

0 comments on commit 39fdbfb

Please sign in to comment.