Comments (9)
Same problem using the older mmcv-full (1.3.0) and mmseg=0.11.0.
Using yapf=0.40.1
Small update: pip install yapf=0.32 fixes this issue for me.
from mmengine.
I used a wait
function to control each rank's import, and make sure they are imported one by one. Stupid, but working
import time
import os
def wait_before_import_config():
t = int(os.environ.get('LOCAL_RANK', 0))
time.sleep(t * 0.5)
def wait_after_import_config():
t = int(os.environ.get('WORLD_SIZE', 0)) - int(os.environ.get('LOCAL_RANK', 0))
time.sleep(t * 0.5)
wait_before_import_config()
from mmengine.config import Config
wait_after_import_config()
from mmengine.
I think it's a yapf problem, the repo of yapf also reported this link
from mmengine.
I am getting this as well
from mmengine.
In my case, setup is:
"mmengine==0.10.2"
"mmcv==2.1.0"
"mmdet==3.3.0"
on ubuntu
from mmengine.
This has been happening a lot for us. On older versions of mmcv.
from mmengine.
@DeclK you are a hero!
from mmengine.
I used a
wait
function to control each rank's import, and make sure they are imported one by one. Stupid, but workingimport time import os def wait_before_import_config(): t = int(os.environ.get('LOCAL_RANK', 0)) time.sleep(t * 0.5) def wait_after_import_config(): t = int(os.environ.get('WORLD_SIZE', 0)) - int(os.environ.get('LOCAL_RANK', 0)) time.sleep(t * 0.5) wait_before_import_config() from mmengine.config import Config wait_after_import_config()
pls check this issue,may be helpful for you:google/yapf#1204
from mmengine.
Similar problem i meet when using mmengine,how i find a way to fix in this issue:google/yapf#1204
from mmengine.
Related Issues (20)
- [Docs] Add "colossalai" in requirements HOT 1
- [Feature] Early Stopping, Validation Loss HOT 1
- [Feature] A Checkpoint hook for saving model checkpoints as Weights & Biases Artifacts
- [Bug] load_from pretrained checkpoint fails using FlexibleRunner and DeepSpeed HOT 2
- scattering the data to gpu when using base dataelement HOT 1
- [Bug] MMDistributedDataParallel distributed training can not help save memory. The total memory usage is twice that of a single card. HOT 2
- AttributeError: module 'torch.distributed' has no attribute 'ReduceOp'
- [Bug] DVCLiveVisBackend initializing DVC workspace in subdirectories HOT 1
- Is anywhere record the version support matrix between mmengine and pytorch? HOT 2
- [Feature] SegVisualizationHook: work in 'iter' but no 'epoch'
- [Bug]
- Suggested combination of Runner and AmpOptimWrapper does not result in mixed precision training [Docs]
- DeepSpeed2 不能自动排除冻结的参数[Bug] HOT 1
- [Bug] 性能问题:_get_valid_value函数首次调用torch.Tensor.item()时耗时过长
- [Feature] Speed up the resume process of IterBased loop HOT 2
- [Docs] Add OMG-Seg to ecoystem projects
- 不是大模型使用并行策略的效率大大降低 ! HOT 2
- [Bug] Error Encountered with mmengine Dependency Involving JSON and Time Modules HOT 1
- [Bug] No module named 'mmengine.models' HOT 2
- [Bug] Unable to save results using pklfile_prefix tag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmengine.