- composer.optim.compile_composer_scheduler(scheduler, state, ssr=1.0)#
Converts a stateless scheduler into a PyTorch scheduler object.
While the resulting scheduler provides a
.step()interface similar to other PyTorch schedulers, the scheduler is also given a bound reference to the current
State. This means that any internal state updated by
.step()can be ignored, and the scheduler can instead simply use the bound state to recalculate the current learning rate.