class_docstr: Abstract class for custom training or validation loops.
  
  The scheduler will only be called at a batch or epoch frequency, depending
  on the user parameter. Be sure to set ``scheduler_step_freq`` in
  ``TorchTrainer`` to either "batch" or "epoch" to increment the scheduler
  correctly during training. If using a learning rate scheduler
  that depends on validation loss, you can use ``trainer.update_scheduler``.
  
  For both training and validation, there are two granularities that
  you can provide customization: per epoch or per batch.
  You do not need to override both.
  
  .. image:: raysgd-custom.jpg
      :scale: 80%
      :align: center
  
  Raises:
      ValueError if multiple models/optimizers/schedulers are provided.
          You are expected to subclass this class if you wish
          to train over multiple models/optimizers/schedulers.
docstr: dict: Provided into TorchTrainer.
docstr_tok: ["dict",":","Provided","into","TorchTrainer","."]
code: def config(self):
      """dict: Provided into TorchTrainer."""
      return self._config
  
imports: import collections
  import torch
  import numpy
  from zoo.orca.learn.metrics import Metric
  from zoo.orca.learn.pytorch.utils import TimerCollection, AverageMeterCollection, NUM_SAMPLES
  from zoo.orca.learn.pytorch.constants import SCHEDULER_STEP_EPOCH, NUM_STEPS, SCHEDULER_STEP_BATCH, SCHEDULER_STEP
  from torch.nn.parallel import DistributedDataParallel
label_desc: Use image node_id 13 for calling the TrainingOperator obj's underlying member method code with example usage: obj.config() and returns: self