class_docstr: Single training iteration loop of the model.
  
  Performs: data read, forward, loss computation, backward, optimizer step, parameter updates.
  
  Various intermediate steps are also performed:
  - logging the training loss, training eta, LR, etc to loggers
  - logging to tensorboard,
  - performing any self-supervised method specific operations (like in MoCo approach, the
  momentum encoder is updated), computing the scores in swav
  - checkpointing model if user wants to checkpoint in the middle
  of an epoch
code: def run_optimizer_step(task: ClassyTask):
      # Stepping the optimizer also updates learning rate, momentum etc
      # according to the schedulers (if any).
      assert task.where < 1.0, (
          "Optimizer being called with where=1.0. This should not happen "
          "as where=1.0 means training is already finished. Please debug your "
          "training setup. A common issue is the data sampler resuming "
          "where you are checkpointing model at every iterations but not using "
          "the stateful data sampler OR there's an issue in properly resuming the "
          "data sampler."
      )
      if task.amp_type == AmpType.PYTORCH:
          task.amp_grad_scaler.step(task.optimizer, where=task.where)
          task.amp_grad_scaler.update()
      else:
          task.optimizer.step(where=task.where)
      # set the model grads to None to save memory only in case of FSDP model
      if is_fsdp_model(task.model):
          zero_grad(task.model)
  
imports: import contextlib
  from types import SimpleNamespace
  from typing import Any, Dict
  import torch
  from classy_vision.generic.distributed_util import all_reduce_mean
  from classy_vision.tasks import ClassyTask
  from classy_vision.tasks.classification_task import AmpType
  from vissl.hooks import SSLClassyHookFunctions
  from vissl.trainer.train_steps import register_train_step
  from vissl.utils.activation_checkpointing import manual_gradient_all_reduce, manual_sync_params
  from vissl.utils.fsdp_utils import is_fsdp_model
  from vissl.utils.misc import is_apex_available, torch_version
  from vissl.utils.perf_stats import PerfTimer
  from vissl.utils.profiler import record_function
label_desc: Use image node_id 9 for calling the StandardTrainStep obj's underlying member method code with example usage: obj.run_optimizer_step(task) without return types