LinearSchedulerWithLinearWarmup
- class lightning_ir.schedulers.schedulers.LinearSchedulerWithLinearWarmup(num_warmup_steps: int, num_training_steps: int, *args, final_value: float = 0.0, num_delay_steps: int = 0, **kwargs)[source]
Bases:
LambdaWarmupScheduler- __init__(num_warmup_steps: int, num_training_steps: int, *args, final_value: float = 0.0, num_delay_steps: int = 0, **kwargs) None[source]
Scheduler for linearly decreasing values with linear warmup.
- Parameters:
num_warmup_steps (int) – Number of warmup steps.
num_training_steps (int) – Number of training steps.
final_value (float, optional) – Final value that should be reached at the end of decay. Defaults to 0.0.
num_delay_steps (int | None) – Number of steps to delay warmup / decay. Defaults to 0.
Methods
__init__(num_warmup_steps, ...[, ...])Scheduler for linearly decreasing values with linear warmup.
value_lambda(current_step)Lambda function for linearly decreasing values with linear warmup.
- value_lambda(current_step: int) float[source]
Lambda function for linearly decreasing values with linear warmup.
- Parameters:
current_step (int) – Current step.
- Returns:
Value at the current step.
- Return type:
float