Skip to content

Commit dcac673

Browse files
committed
do not update lr scheduler during warmup
1 parent 17ac713 commit dcac673

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
@@ -184,7 +184,11 @@ def _get_cosine_schedule_with_warmup_lr_lambda(
184184
num_cycles: float,
185185
min_lr_rate: float = 0.0,
186186
):
187-
if warmup_outerstep is not None and current_step % num_inner_steps < warmup_outerstep:
187+
if (
188+
warmup_outerstep is not None
189+
and current_step > num_warmup_steps
190+
and current_step % num_inner_steps < warmup_outerstep
191+
):
188192
return 0
189193

190194
if current_step < num_warmup_steps:

0 commit comments

Comments
 (0)