(Delete this line and the text above it.)
What did you expect to see?
What did you observe instead?
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
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
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!!!!!
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.