Skip to content

Commit ac54218

Browse files
committed
do not update lr scheduler during warmup
1 parent 9d03959 commit ac54218

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

open_diloco/train_fsdp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ def _get_cosine_schedule_with_warmup_lr_lambda(
185185
num_cycles: float,
186186
min_lr_rate: float = 0.0,
187187
):
188-
if warmup_outerstep is not None and current_step % num_inner_steps < warmup_outerstep:
188+
if (
189+
warmup_outerstep is not None
190+
and current_step > num_warmup_steps
191+
and current_step % num_inner_steps < warmup_outerstep
192+
):
189193
return 0
190194

191195
if current_step < num_warmup_steps:

0 commit comments

Comments
 (0)