Inference on Colab - Setup issue
See original GitHub issueI tried to setup and run inference on a custom dataset from Google Colab. But, I am not able to run the setup and I get this error. Can you please help resolve this?
`running develop
running egg_info
writing mmdet.egg-info/PKG-INFO
writing dependency_links to mmdet.egg-info/dependency_links.txt
writing requirements to mmdet.egg-info/requires.txt
writing top-level names to mmdet.egg-info/top_level.txt
/usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py:304: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja… Falling back to using the slow distutils backend.
warnings.warn(msg.format(‘we could not find ninja.’))
writing manifest file ‘mmdet.egg-info/SOURCES.txt’
running build_ext
building ‘mmdet.ops.roi_align.roi_align_cuda’ extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c mmdet/ops/roi_align/src/roi_align_cuda.cpp -o build/temp.linux-x86_64-3.6/mmdet/ops/roi_align/src/roi_align_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roi_align_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
mmdet/ops/roi_align/src/roi_align_cuda.cpp: In function ‘int roi_align_forward_cuda(at::Tensor, at::Tensor, int, int, float, int, at::Tensor)’:
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(features);
^
In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: error: ‘AT_CHECK’ was not declared in this scope
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(features);
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: suggested alternative: ‘DCHECK’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(features);
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:32:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(rois);
^
In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:33:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(output);
^
In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp: In function ‘int roi_align_backward_cuda(at::Tensor, at::Tensor, int, int, float, int, at::Tensor)’:
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(top_grad);
^
In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: error: ‘AT_CHECK’ was not declared in this scope
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(top_grad);
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: suggested alternative: ‘DCHECK’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(top_grad);
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:60:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(rois);
^
In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
^
mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(x);
^~~~~~~~~~
mmdet/ops/roi_align/src/roi_align_cuda.cpp:61:3: note: in expansion of macro ‘CHECK_INPUT’
CHECK_INPUT(bottom_grad);
^
In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4,
from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1:
/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
CalledProcessError Traceback (most recent call last) <ipython-input-12-b00741d84eec> in <module>() ----> 1 get_ipython().run_cell_magic(‘shell’, ‘’, ‘cd /content/Pedestron/\npython setup.py develop’)
2 frames /usr/local/lib/python3.6/dist-packages/google/colab/_system_commands.py in check_returncode(self) 136 if self.returncode: 137 raise subprocess.CalledProcessError( –> 138 returncode=self.returncode, cmd=self.args, output=self.output) 139 140 def repr_pretty(self, p, cycle): # pylint:disable=unused-argument
CalledProcessError: Command ‘cd /content/Pedestron/ python setup.py develop’ returned non-zero exit status 1.`
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Looks fine. Please submit a PR into same branch.
Pedestron does not support CUDA 10.1 at the moment also your PyTorch and mmcv version is too high (look at the installation file for the versions). See previous issues for example #17