class_docstr: Enum for specifying update frequency for scheduler.
  
  Attributes:
      EPOCH (str): Update param before each epoch
      STEP (str): Update param before each optimizer step
class_docstr_tok: ["Enum","for","specifying","update","frequency","for","scheduler",".","Attributes",":","EPOCH","(","str",")",":","Update","param","before","each","epoch","STEP","(","str",")",":","Update","param","before","each","optimizer","step"]
docstr: Fetches the update interval from a config
  
  Args:
      config: The config for the parameter scheduler
      default: The value to use if the config doesn't specify an update interval.
          If not set, STEP is used.
docstr_tok: ["Fetches","the","update","interval","from","a","config","Args",":","config",":","The","config","for","the","parameter","scheduler","default",":","The","value","to","use","if","the","config","does","n't","specify","an","update","interval",".","If","not","set",",","STEP","is","used","."]
code: def from_config(
      cls, config: Dict[str, Any], default: "UpdateInterval" = None
  ) -> "UpdateInterval":
      """Fetches the update interval from a config
  
      Args:
          config: The config for the parameter scheduler
          default: The value to use if the config doesn't specify an update interval.
              If not set, STEP is used.
      """
      if default is None:
          default = cls.STEP
      if "update_interval" not in config:
          return default
      if config.get("update_interval").lower() not in ["step", "epoch"]:
          raise ValueError(
              "Choices for update interval are 'step' or 'epoch'"
          )
      return cls[config["update_interval"].upper()]
  
file_path: ClassyVision/classy_vision/optim/param_scheduler/classy_vision_param_scheduler.py
imports: from enum import Enum
  from typing import Any, Dict
  from classy_vision.generic.util import log_class_usage
  from fvcore.common import param_scheduler
label_desc: Use image node_id 1 for calling the UpdateInterval obj's underlying member method code with example usage: obj.from_config(cls, config, default) and returns: cls, default