# core.trainers.mixins.scheduler

`core.trainers.mixins.scheduler`

Module for Axolotl trainer scheduler mixin

## Classes

Name | Description
--- | ---
SchedulerMixin | Mixin class for scheduler setup in CausalTrainer.

### SchedulerMixin

    core.trainers.mixins.scheduler.SchedulerMixin()

Mixin class for scheduler setup in CausalTrainer.

#### Methods

Name | Description
--- | ---
create_scheduler | Set up the scheduler. The optimizer of the trainer must have been set up either before this method is called or

##### create_scheduler

    core.trainers.mixins.scheduler.SchedulerMixin.create_scheduler(
        num_training_steps,
        optimizer=None,
    )

Set up the scheduler. The optimizer of the trainer must have been set up either before this method is called or passed as an argument.

###### Parameters

Name | Type | Description | Default
--- | --- | --- | ---
num_training_steps | int | The number of training steps to do. | required
optimizer | torch.optim.Optimizer | The training optimizer | `None`