compile_composer_scheduler#

composer.optim.compile_composer_scheduler(scheduler, state, ssr=1.0)[source]#

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.

Parameters
Returns

compiled_scheduler (PyTorchScheduler) โ€“ The scheduler, in a form compatible with PyTorch scheduler interfaces.