question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inference on Colab - Setup issue

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hasanirtizacommented, May 28, 2020

Looks fine. Please submit a PR into same branch.

1reaction
hasanirtizacommented, May 27, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues running GPT-J-6B demo inference on colab
I believe that colab run out of disk memory trying to download model and dependencies but why this demo exists on colab if...
Read more >
Inference On Custom Images ? Colab Demo? · Issue #3 - GitHub
I have been trying to compile DCNv2 as described in your readme file but I think mmcv developers don't support it especially with...
Read more >
Run training and inference on Colab — SLEAP (v1.2.9)
Take a look at our example notebooks which you can run on Colab! These will walk you through the entire process of running...
Read more >
How to Use Google Colab for Deep Learning
Training a machine learning model in Colab is very easy. The best part about it is not having to set up a custom...
Read more >
inference_playground.ipynb - Colaboratory - Google Colab
Step 1: Select Experiment Type · Step 2: Prepare to Download Pretrained Models · Step 3: Define Inference Parameters · Step 4: Load...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found