Giter VIP home page Giter VIP logo

Comments (9)

MohammedSB avatar MohammedSB commented on August 18, 2024 3

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.

DeclK avatar DeclK commented on August 18, 2024 2

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.

DeclK avatar DeclK commented on August 18, 2024

I think it's a yapf problem, the repo of yapf also reported this link

from mmengine.

Data-drone avatar Data-drone commented on August 18, 2024

I am getting this as well

from mmengine.

Data-drone avatar Data-drone commented on August 18, 2024

In my case, setup is:

"mmengine==0.10.2"
"mmcv==2.1.0"
"mmdet==3.3.0"

on ubuntu

from mmengine.

matthost avatar matthost commented on August 18, 2024

This has been happening a lot for us. On older versions of mmcv.

from mmengine.

matthost avatar matthost commented on August 18, 2024

@DeclK you are a hero!

from mmengine.

whlook avatar whlook commented on August 18, 2024

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()

pls check this issue,may be helpful for you:google/yapf#1204

from mmengine.

whlook avatar whlook commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.