class_docstr: The DDP module that supports DataContainer.
  
  This MMDDP has some differences with the original MMDDP:
  
  - It implements a ``forward()`` method
  - It update the code in ``train_step()`` ``val_step()`` and ``_run_ddp_forward()``
  when self.device_ids is None, which means training with CPU
  
  related issues:
  - https://github.com/open-mmlab/mmcv/issues/2524
  - https://github.com/open-mmlab/mmcv/issues/2558
  When the issues above is solved by mmcv, this file can be deleted, then directly
  use the MMDDP implemented by mmcv in MMCVRayEpochRunner.
docstr: Override the original forward function.
  
  The main difference lies in the CPU inference where the data in
  :class:`DataContainers` will still be gathered.
docstr_tok: ["Override","the","original","forward","function",".","The","main","difference","lies","in","the","CPU","inference","where","the","data","in",":","class",":","`","DataContainers","`","will","still","be","gathered","."]
code: def forward(self, *inputs, **kwargs):
      """Override the original forward function.
  
      The main difference lies in the CPU inference where the data in
      :class:`DataContainers` will still be gathered.
      """
      if not self.device_ids:
          # We add the following line thus the module could gather and
          # convert data containers as those in GPU inference
          inputs, kwargs = self.scatter(inputs, kwargs, [-1])
          return self.module(*inputs[0], **kwargs[0])
      else:
          return super().forward(*inputs, **kwargs)
  
file_path: BigDL/python/orca/src/bigdl/orca/learn/pytorch/experimential/mmcv/distributed.py
imports: from typing import Any, List, Tuple
  import torch
  from torch.nn.parallel.distributed import DistributedDataParallel, _find_tensors
  from mmcv import print_log
  from mmcv.utils import TORCH_VERSION, digit_version
  from mmcv.parallel.scatter_gather import ScatterInputs, scatter_kwargs
label_desc: Use image node_id 1 for calling the MMDistributedDataParallel obj's underlying member method code with example usage: obj.forward() and returns: self, super