Detectron: No handlers could be found for logger "caffe2.python.net_drawer"

Created on 20 Feb 2018  ·  3Comments  ·  Source: facebookresearch/Detectron

PLEASE FOLLOW THESE INSTRUCTIONS BEFORE POSTING

  1. Please thoroughly read README.md, INSTALL.md, GETTING_STARTED.md, and FAQ.md
  2. Please search existing open and closed issues in case your issue has already been reported
  3. Please try to debug the issue in case you can solve it on your own before posting

After following steps 1-3 above and agreeing to provide the detailed information requested below, you may continue with posting your issue

(Delete this line and the text above it.)

Expected results

What did you expect to see?

Actual results

What did you observe instead?

Detailed steps to reproduce

getting error: run ~/src/caffe2/caffe2/detectron/tests$ python2 /home/ubuntu/src/caffe2/caffe2/detectron/tests/test_spatial_narrow_as_op.py
E.g.:

The command that you ranpython2 /home/ubuntu/src/caffe2/caffe2/detectron/tests/test_spatial_narrow_as_op.py

System information

Operating system: UBUNTU 16.04
Compiler version:
Timestamp : Tue Feb 20 06:45:13 2018
Driver Version : 390.30

Attached GPUs : 4
GPU 00000000:00:03.0
Product Name : GRID K520
Product Brand : Grid

GPU models (for all devices if they are not all the same): AWS AMI
PYTHONPATH environment variable:
~/src/caffe2/caffe2$ echo $PYTHONPATH
/home/ubuntu/src/caffe2/build:/home/ubuntu/src/caffe2/caffe2/build:
/home/ubuntu/src/caffe2/caffe2/cmake:
/home/ubuntu/src/caffe2/build:/home/ubuntu/src/caffe2/caffe2/python:
/home/ubuntu/src/caffe2/caffe2/python/operator_test:/home/ubuntu/src/caffe2/build (TRIED EVERYTHING!)
python --version output: 2.7

ANYTHING ELSE:

python2 /home/ubuntu/src/caffe2/caffe2/detectron/tests/test_spatial_narrow_as_op.py
No handlers could be found for logger "caffe2.python.net_drawer"
net_drawer will not run correctly. Please install the correct dependencies.
Traceback (most recent call last):
File "/home/ubuntu/src/caffe2/caffe2/detectron/tests/test_spatial_narrow_as_op.py", line 29, in
import utils.c2
ImportError: No module named c2

Most helpful comment

Hi @partnercloudsupport, that sounds great. Note that the lines you posted above are not an error. Namely, these are Caffe2 warnings saying that you have not compiled Caffe2 binary with avx support. This is relevant for running on the CPU and can be ignored in case of Detectron that runs on the GPU. The test now passes and you can proceed with the rest of the install/getting_started instructions.

All 3 comments

Hi @partnercloudsupport, the caffe2.python.net_drawer warning can be safely ignored for the purpose of this test. Instead, the issue seems to be

File "/home/ubuntu/src/caffe2/caffe2/detectron/tests/test_spatial_narrow_as_op.py", line 29, in
import utils.c2
ImportError: No module named c2

Firstly, please make sure that you have set up Detectron python modules (run make) following the instructions from INSTALL.md.

Looking at your PYTHONPATH, it seems that it contains various Caffe2 subdirs which may be causing the issue (e.g. there may be a utils module under one of them). Try setting your PYTHONPATH to only contain the path to the Caffe2 build directory (PYTHONPATH=/path/to/caffe2/caffe2/build).

Also, it seems that you cloned the Detectron repo within the Caffe2 repo. I suggest you clone/keep your Detectron repo outside of the Caffe2 repo.

Hi @partnercloudsupport, that sounds great. Note that the lines you posted above are not an error. Namely, these are Caffe2 warnings saying that you have not compiled Caffe2 binary with avx support. This is relevant for running on the CPU and can be ignored in case of Detectron that runs on the GPU. The test now passes and you can proceed with the rest of the install/getting_started instructions.

Your awesome! Thank you very much!!!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gaopeng-eugene picture gaopeng-eugene  ·  4Comments

elfpattern picture elfpattern  ·  3Comments

coldgemini picture coldgemini  ·  3Comments

Adhders picture Adhders  ·  3Comments

Hwang-dae-won picture Hwang-dae-won  ·  3Comments