class_docstr: 参考 :class:`fastNLP.core.drivers.torch_driver.utils._DDPWrappingModel` ， **PaddlePaddle** 的分布式训练也需要用 :class:`paddle.nn.DataParallel` 进行包装，采用和
  **pytorch** 相似的处理方式
class_docstr_tok: ["\u53c2\u8003",":","class",":","`","fastNLP.core.drivers.torch_driver.utils._DDPWrappingModel","`","\uff0c","*","*","PaddlePaddle","*","*","\u7684\u5206\u5e03\u5f0f\u8bad\u7ec3\u4e5f\u9700\u8981\u7528",":","class",":","`","paddle.nn.DataParallel","`","\u8fdb\u884c\u5305\u88c5\uff0c\u91c7\u7528\u548c","*","*","pytorch","*","*","\u76f8\u4f3c\u7684\u5904\u7406\u65b9\u5f0f"]
code: def __init__(self, model: "nn.Layer"):
      super(_FleetWrappingModel, self).__init__()
      self.model = model
  
imports: import socket
  import os
  import struct
  import random
  import inspect
  import numpy
  from copy import deepcopy
  from contextlib import ExitStack, closing
  from typing import Dict, Optional
  from fastNLP.envs.imports import _NEED_IMPORT_PADDLE
  from fastNLP.envs.utils import get_global_seed
  from fastNLP.envs import get_global_rank, FASTNLP_BACKEND_LAUNCH, FASTNLP_GLOBAL_SEED
  from fastNLP.core.samplers import ReproducibleBatchSampler
  from fastNLP.core.utils import auto_param_call, paddle_to
  from fastNLP.core.log import logger
label_desc: Use image node_id 1 to create a new _FleetWrappingModel object from inherited base classes: Layer with example: obj = _FleetWrappingModel(model)