
    9i                         S SK Jr  S rg)   )PARALLELc                     / n[         R                  R                  5        H-  u  p#UR                  [	        UR                  5       5      5        M/     [        U [        U5      5      $ )a  Check if a module is wrapped by parallel object.

The following modules are regarded as parallel object:
 - torch.nn.parallel.DataParallel
 - torch.nn.parallel.distributed.DistributedDataParallel
You may add you own parallel object by registering it to `modelscope.parallel.PARALLEL`.

Args:
    module (nn.Module): The module to be checked.

Returns:
    bool: True if the is wrapped by parallel object.
)r   modulesitemsextendlistvalues
isinstancetuple)modulemodule_wrappersgroupmodule_dicts       b/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/modelscope/trainers/parallel/utils.pyis_parallelr      sU     O&..446tK$6$6$89: 7 feO455    N)builderr   r    r   r   <module>r      s    6r   