[Bug] ImportError: cannot import name 'MMDataParallel' from 'mmcv.parallel'
Prerequisite
- [x] I have searched Issues and Discussions but cannot get the expected help.
- [x] The bug has not been fixed in the latest version(https://github.com/open-mmlab/mmcv).
Environment
Reproduces the problem - code sample
Reproduces the problem - command or script
Reproduces the problem - error message
Additional information
I'm supposed to:'from mmcv.parallel import MMDataParallel, MMDistributedDataParallel', it certainly runs error because I know that you have updated mmcv and many are transfered to mmengine, so I searched them in mmengine. I can find 'MMDistributedDataParallel' from the latest version in mmengine.model, however, 'MMDataParallel' can't be found anywhere, is it deleted or repalced by other name? Additionally, others like 'wrap_fp16_model' in mmcv or 'build_detector' in mmdet3d has exactly the same question.
I'm having the same issue. For anyone else also struggling to update their repo to support mmcv 2.0, this document might be helpful: https://mmcv.readthedocs.io/en/latest/get_started/api_reference.html
Like OP, I was able to locate MMDistributedDataParallel in mmengine.model.wrappers.distributed.MMDistributedDataParallel according to the document above. However, it doesn't specify where to find MMDataParallel in the newer versions of mmcv. Hope this gets resolved soon 🙏
Running into a similar issue where I cannot find MMDataParallel, hopefully this can be resolved soon
You can use from mmengine.model import MMDistributedDataParallel but cannot find MMDataParallel