class_docstr: Sets the learning rate of each parameter group to follow a linear warmup schedule between warmup_start_lr and
  base_lr followed by a cosine annealing schedule between base_lr and eta_min.
  
  .. warning::
      It is recommended to call :func:`.step()` for :class:`LinearWarmupCosineAnnealingLR`
      after each iteration as calling it after each epoch will keep the starting lr at
      warmup_start_lr for the first epoch which is 0 in most cases.
  
  .. warning::
      passing epoch to :func:`.step()` is being deprecated and comes with an EPOCH_DEPRECATION_WARNING.
      It calls the :func:`_get_closed_form_lr()` method for this scheduler instead of
      :func:`get_lr()`. Though this does not change the behavior of the scheduler, when passing
      epoch param to :func:`.step()`, the user should call the :func:`.step()` function before calling
      train and validation methods.
  
  Example:
      >>> from torch import nn
      >>> from torch.optim import Adam
      >>> layer = nn.Linear(10, 1)
      >>> optimizer = Adam(layer.parameters(), lr=0.02)
      >>> scheduler = LinearWarmupCosineAnnealingLR(optimizer, warmup_epochs=10, max_epochs=40)
      >>> #
      >>> # the default case
      >>> for epoch in range(40):
      ...     # train(...)
      ...     # validate(...)
      ...     scheduler.step()
      >>> #
      >>> # passing epoch param case
      >>> for epoch in range(40):
      ...     scheduler.step(epoch)
      ...     # train(...)
      ...     # validate(...)
docstr: Args:
      optimizer (Optimizer): Wrapped optimizer.
      warmup_epochs (int): Maximum number of iterations for linear warmup
      max_epochs (int): Maximum number of iterations
      warmup_start_lr (float): Learning rate to start the linear warmup. Default: 0.
      eta_min (float): Minimum learning rate. Default: 0.
      last_epoch (int): The index of last epoch. Default: -1.
docstr_tok: ["Args",":","optimizer","(","Optimizer",")",":","Wrapped","optimizer",".","warmup_epochs","(","int",")",":","Maximum","number","of","iterations","for","linear","warmup","max_epochs","(","int",")",":","Maximum","number","of","iterations","warmup_start_lr","(","float",")",":","Learning","rate","to","start","the","linear","warmup",".","Default",":","0.","eta_min","(","float",")",":","Minimum","learning","rate",".","Default",":","0.","last_epoch","(","int",")",":","The","index","of","last","epoch",".","Default",":","-1","."]
code: def __init__(
      self,
      optimizer: Optimizer,
      warmup_epochs: int,
      max_epochs: int,
      warmup_start_lr: float = 0.0,
      eta_min: float = 0.0,
      last_epoch: int = -1,
  ) -> None:
      """
      Args:
          optimizer (Optimizer): Wrapped optimizer.
          warmup_epochs (int): Maximum number of iterations for linear warmup
          max_epochs (int): Maximum number of iterations
          warmup_start_lr (float): Learning rate to start the linear warmup. Default: 0.
          eta_min (float): Minimum learning rate. Default: 0.
          last_epoch (int): The index of last epoch. Default: -1.
      """
      self.warmup_epochs = warmup_epochs
      self.max_epochs = max_epochs
      self.warmup_start_lr = warmup_start_lr
      self.eta_min = eta_min
  
      super().__init__(optimizer, last_epoch)
  
file_path: lightning-flash/src/flash/core/optimizers/lr_scheduler.py
imports: import math
  import warnings
  from typing import List
  from torch.optim import Optimizer
  from torch.optim.lr_scheduler import _LRScheduler
  from flash.core.utilities.imports import _TOPIC_CORE_AVAILABLE
label_desc: Use image node_id 1 to create a new LinearWarmupCosineAnnealingLR object from inherited base classes: _LRScheduler with example: obj = LinearWarmupCosineAnnealingLR(optimizer, warmup_epochs, max_epochs, warmup_start_lr, eta_min, last_epoch)