class_docstr: Extending DDPStrategy to support IPEX and auto_lr on k8s.
docstr: Wraps the model into a 'DistributedDataParallel' module.
docstr_tok: ["Wraps","the","model","into","a","'DistributedDataParallel","'","module","."]
code: def _setup_model(self, model: nn.Module) -> DistributedDataParallel:
      """Wraps the model into a 'DistributedDataParallel' module."""
      # we should override this method to change the creation of `DistributedDataParallel`
      # we need to set `find_unused_parameters` to True to fix mult-instance training,
      # `Trainer` will set it automatically, but `TorchNano` won't, so we set it manually
      self._ddp_kwargs["find_unused_parameters"] = True
      return DistributedDataParallel(model, **self._ddp_kwargs)
  
imports: from pytorch_lightning.strategies import DDPStrategy
  from typing import Any, List, Optional, Union, Dict
  import torch
  import os
  import warnings
  from torch import nn
  from torch.nn.parallel.distributed import DistributedDataParallel
  from torch.optim.lr_scheduler import _LRScheduler
  import pytorch_lightning
  from pytorch_lightning.core.optimizer import LightningOptimizer
  from pytorch_lightning.core.optimizer import _configure_schedulers_automatic_opt
  from pytorch_lightning.core.optimizer import _configure_schedulers_manual_opt
  from pytorch_lightning.core.optimizer import _set_scheduler_opt_idx, _validate_scheduler_api
  from pytorch_lightning.plugins.environments import KubeflowEnvironment
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.utils.pytorch import TORCH_VERSION_LESS_1_12
  from bigdl.nano.deps.ipex.ipex_api import ipex_optimize
label_desc: Use image node_id 4 for calling the DDPK8sStrategy obj's underlying member method code with example usage: obj._setup_model(model) and returns: DistributedDataParallel