class_docstr: Base class for optimizers.
  
  This wraps a :class:`torch.optim.Optimizer` instance and provides support
  for parameter scheduling. Typical PyTorch optimizers are used like this:
  
      optim = SGD(model.parameters(), lr=0.1)
  
  but the user is responsible for updating lr over the course of training.
  ClassyOptimizers extend PyTorch optimizers and allow specifying
  ParamSchedulers instead:
  
      optim = SGD()
      optim.set_param_groups(model.parameters(), lr=LinearParamScheduler(1, 2))
  
  This means that as you step through the optimizer, the learning rate will
  automatically get updated with the given schedule. To access the current
  learning rate value (or any other optimizer option), you can read
  `optim.options_view.lr`. Similar to other Classy abstractions, you can also
  instantiate ClassyOptimizers from a configuration file.
class_docstr_tok: ["Base","class","for","optimizers",".","This","wraps","a",":","class",":","`","torch.optim.Optimizer","`","instance","and","provides","support","for","parameter","scheduling",".","Typical","PyTorch","optimizers","are","used","like","this",":","optim","=","SGD","(","model.parameters","(",")",",","lr=0.1",")","but","the","user","is","responsible","for","updating","lr","over","the","course","of","training",".","ClassyOptimizers","extend","PyTorch","optimizers","and","allow","specifying","ParamSchedulers","instead",":","optim","=","SGD","(",")","optim.set_param_groups","(","model.parameters","(",")",",","lr=LinearParamScheduler","(","1",",","2",")",")","This","means","that","as","you","step","through","the","optimizer",",","the","learning","rate","will","automatically","get","updated","with","the","given","schedule",".","To","access","the","current","learning","rate","value","(","or","any","other","optimizer","option",")",",","you","can","read","`","optim.options_view.lr","`",".","Similar","to","other","Classy","abstractions",",","you","can","also","instantiate","ClassyOptimizers","from","a","configuration","file","."]
docstr: Called at the end of a phase.
  
  Updates the param schedule at the end of a phase, till training is in progress.
  This should be called by the task at the end of every epoch to update the
  schedule of epoch based param schedulers (See
  :class:`param_scheduler.ParamScheduler` for more information).
  
  Args:
      where: where we are in terms of training progress (output of
          :func:`tasks.ClassyTask.where`)
docstr_tok: ["Called","at","the","end","of","a","phase",".","Updates","the","param","schedule","at","the","end","of","a","phase",",","till","training","is","in","progress",".","This","should","be","called","by","the","task","at","the","end","of","every","epoch","to","update","the","schedule","of","epoch","based","param","schedulers","(","See",":","class",":","`","param_scheduler.ParamScheduler","`","for","more","information",")",".","Args",":","where",":","where","we","are","in","terms","of","training","progress","(","output","of",":","func",":","`","tasks.ClassyTask.where","`",")"]
code: def on_epoch(self, where: float) -> None:
      """
      Called at the end of a phase.
  
      Updates the param schedule at the end of a phase, till training is in progress.
      This should be called by the task at the end of every epoch to update the
      schedule of epoch based param schedulers (See
      :class:`param_scheduler.ParamScheduler` for more information).
  
      Args:
          where: where we are in terms of training progress (output of
              :func:`tasks.ClassyTask.where`)
      """
      if where < 1:
          # do not update the schedule on final on_epoch call when where == 1
          self._update_schedule(
              self._run_schedulers(where, UpdateInterval.EPOCH)
          )
  
imports: from abc import ABC, abstractmethod
  from typing import Any, Callable, Dict, Optional
  from classy_vision.generic.util import log_class_usage
  from .param_scheduler import ConstantParamScheduler, ParamScheduler, UpdateInterval
label_desc: Use image node_id 9 for calling the ClassyOptimizer obj's underlying member method code with example usage: obj.on_epoch(where) without return types