remove redundant code in trainer (#36994)

* Update optimization.py

* Update optimization.py
This commit is contained in:
hoshi-hiyouga 2025-03-27 18:35:15 +08:00 committed by GitHub
parent d13c390d01
commit 279c2e302a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -582,6 +582,7 @@ def get_scheduler(
if name == SchedulerType.INVERSE_SQRT:
return schedule_func(optimizer, num_warmup_steps=num_warmup_steps)
# wsd scheduler requires either num_training_steps or num_stable_steps
if name == SchedulerType.WARMUP_STABLE_DECAY:
return schedule_func(
optimizer,