Skip to content

Commit

Permalink
add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
catwell committed Dec 20, 2024
1 parent feb0214 commit 51bbd4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/refiners/training_utils/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def backward(self) -> None:
self.optimizer.zero_grad()
self._call_callbacks(event_name="on_optimizer_step_end")
if self.clock.is_due(self.config.lr_scheduler.update_interval):
# TODO: if the update interval is in Epochs, this will be called
# at every optimizer step during targeted epochs. It should probably
# only be called once instead.
self._call_callbacks(event_name="on_lr_scheduler_step_begin")
self.lr_scheduler.step()
self._call_callbacks(event_name="on_lr_scheduler_step_end")
Expand Down

0 comments on commit 51bbd4f

Please sign in to comment.