class_docstr: Learning Rate Scheduler Plugin.
  
  This plugin manages learning rate scheduling inside of a strategy using the
  PyTorch scheduler passed to the constructor. The step() method of the
  scheduler is called after each training epoch or iteration.
  
  Metric-based schedulers (like ReduceLROnPlateau) are supported as well.
class_docstr_tok: ["Learning","Rate","Scheduler","Plugin",".","This","plugin","manages","learning","rate","scheduling","inside","of","a","strategy","using","the","PyTorch","scheduler","passed","to","the","constructor",".","The","step","(",")","method","of","the","scheduler","is","called","after","each","training","epoch","or","iteration",".","Metric-based","schedulers","(","like","ReduceLROnPlateau",")","are","supported","as","well","."]
code: def after_training_exp(
      self, strategy: "SupervisedTemplate", **kwargs
  ):
      param_groups = strategy.optimizer.param_groups
      base_lrs = self.scheduler.base_lrs
  
      if self.reset_lr:
          for group, lr in zip(param_groups, base_lrs):
              group["lr"] = lr
  
      if self.reset_scheduler:
          self.scheduler.last_epoch = 0
  
          # Manage the reset of the scheduler
          # Mainly used to call _reset on ReduceLROnPlateau, but may come
          # in handy for other schedulers in the future
          reset_method = getattr(self.scheduler, "reset", None)
          if not callable(reset_method):
              reset_method = getattr(self.scheduler, "_reset", None)
  
          if callable(reset_method):
              # print('Calling reset method of scheduler')
              reset_method()
  
imports: import warnings
  from typing import TYPE_CHECKING
  from typing_extensions import Literal
  from avalanche.evaluation.metrics import Mean
  from avalanche.training.plugins import SupervisedPlugin
  import inspect
label_desc: Use image node_id 4 for calling the LRSchedulerPlugin obj's underlying member method code with example usage: obj.after_training_exp(strategy) without return types