dvlab-research / Stratified-Transformer

Stratified Transformer for 3D Point Cloud Segmentation (CVPR 2022)
MIT License
363 stars 40 forks source link

Environmental problem #38

Open prannt99 opened 2 years ago

prannt99 commented 2 years ago

Thanks for all you have contributed to the open community! I encountered a familiar bug with #36 when run the command python3 train.py --config config/s3dis/s3dis_stratified_transformer.yaml, which is detailed as follows: `Traceback (most recent call last): File "train.py", line 21, in from util.s3dis import S3DIS File "/root/Stratified-Transformer/util/s3dis.py", line 8, in from util.voxelize import voxelize File "/root/Stratified-Transformer/util/voxelize.py", line 4, in from torch_geometric.nn import voxel_grid File "/opt/anaconda3/envs/st/lib/python3.7/site-packages/torch_geometric/init.py", line 5, in import torch_geometric.data File "/opt/anaconda3/envs/st/lib/python3.7/site-packages/torch_geometric/data/init.py", line 1, in from .data import Data File "/opt/anaconda3/envs/st/lib/python3.7/site-packages/torch_geometric/data/data.py", line 8, in from torch_sparse import coalesce, SparseTensor File "/opt/anaconda3/envs/st/lib/python3.7/site-packages/torch_sparse/init.py", line 40, in from .storage import SparseStorage # noqa File "/opt/anaconda3/envs/st/lib/python3.7/site-packages/torch_sparse/storage.py", line 21, in class SparseStorage(object): File "/opt/anaconda3/envs/st/lib/python3.7/site-packages/torch/jit/_script.py", line 924, in script _compile_and_register_class(obj, _rcb, qualified_name) File "/opt/anaconda3/envs/st/lib/python3.7/site-packages/torch/jit/_script.py", line 64, in _compile_and_register_class torch._C._jit_script_class_compile(qualified_name, ast, defaults, rcb) RuntimeError: Arguments for call are not valid. The following variants are available:

aten::div.Tensor(Tensor self, Tensor other) -> (Tensor): Expected a value of type 'Tensor' for argument 'other' but instead found type 'int'.

aten::div.Scalar(Tensor self, Scalar other) -> (Tensor): Keyword argument rounding_mode unknown.

aten::div.out(Tensor self, Tensor other, *, Tensor(a!) out) -> (Tensor(a!)): Expected a value of type 'Tensor' for argument 'other' but instead found type 'int'.

aten::div.int(int a, int b) -> (float): Keyword argument rounding_mode unknown.

aten::div.float(float a, float b) -> (float): Expected a value of type 'float' for argument 'b' but instead found type 'int'.

aten::div(Scalar a, Scalar b) -> (float): Keyword argument rounding_mode unknown.

div(float a, Tensor b) -> (Tensor): Expected a value of type 'Tensor' for argument 'b' but instead found type 'int'.

div(int a, Tensor b) -> (Tensor): Expected a value of type 'Tensor' for argument 'b' but instead found type 'int'.

The original call is: File "/opt/anaconda3/envs/st/lib/python3.7/site-packages/torch_sparse/storage.py", line 316 idx = self.sparse_size(1) * self.row() + self.col()

    row = torch.div(idx, num_cols, rounding_mode='floor')
          ~~~~~~~~~ <--- HERE
    col = idx % num_cols
    assert row.dtype == torch.long and col.dtype == torch.long`

I use the same enviroment with requirements.txt, which torch==1.7.1, gcc==7, torch_sparse==0.6.12, torch_points3d==1.3.0. what should I do to fix the problem? Thanks again!

X-Lai commented 2 years ago

It is weird. The problem seems to lie in torch_sparse. Can you send out your environment by pip list?

luislofer89 commented 2 years ago

Same issue here. Where you able to find any solution?

Here're is my environment saved with pip list (python 3.8.13):

Package Version


absl-py 1.2.0 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 ase 3.22.1 asttokens 2.0.5 attrs 22.1.0 backcall 0.2.0 beautifulsoup4 4.11.1 bleach 5.0.1 cachetools 5.2.0 certifi 2022.6.15 cffi 1.15.1 charset-normalizer 2.1.0 click 8.1.3 configparser 5.2.0 cycler 0.11.0 debugpy 1.6.2 decorator 5.1.1 defusedxml 0.7.1 docker-pycreds 0.4.0 entrypoints 0.4 executing 0.9.1 fastjsonschema 2.16.1 filelock 3.7.1 gdown 3.15.0 gitdb 4.0.9 GitPython 3.1.27 google-auth 2.9.1 google-auth-oauthlib 0.4.6 googledrivedownloader 0.4 gql 0.2.0 graphql-core 1.1 grpcio 1.48.0 h5py 3.2.1 hydra-core 0.11.3 idna 3.3 imageio 2.20.0 importlib-metadata 4.12.0 importlib-resources 5.9.0 ipykernel 6.15.1 ipython 8.4.0 ipython-genutils 0.2.0 ipywidgets 7.7.1 isodate 0.6.1 jedi 0.18.1 Jinja2 3.1.2 joblib 1.1.0 jsonpatch 1.32 jsonpointer 2.3 jsonschema 4.8.0 jupyter-client 7.3.4 jupyter-core 4.11.1 jupyterlab-pygments 0.2.2 jupyterlab-widgets 1.1.1 kiwisolver 1.4.4 llvmlite 0.33.0 Markdown 3.4.1 MarkupSafe 2.1.1 matplotlib 3.4.2 matplotlib-inline 0.1.3 mistune 0.8.4 nbclient 0.6.6 nbconvert 6.5.0 nbformat 5.4.0 nest-asyncio 1.5.5 networkx 2.8.5 notebook 6.4.12 numba 0.50.1 numpy 1.19.5 nvidia-ml-py3 7.352.0 oauthlib 3.2.0 omegaconf 1.4.1 open3d 0.10.0.0 packaging 21.3 pandas 1.4.3 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.1.0 pip 22.2.1 plyfile 0.7.4 prometheus-client 0.14.1 promise 2.3 prompt-toolkit 3.0.30 protobuf 3.19.4 psutil 5.9.1 ptyprocess 0.7.0 pure-eval 0.2.2 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycparser 2.21 Pygments 2.12.0 pyparsing 3.0.9 pyrsistent 0.18.1 PySocks 1.7.1 python-dateutil 2.8.2 python-louvain 0.16 pytorch-metric-learning 0.9.99 pytz 2022.1 PyWavelets 1.3.0 PyYAML 6.0 pyzmq 23.2.0 rdflib 6.2.0 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.9 scikit-image 0.16.2 scikit-learn 1.1.1 scipy 1.6.3 Send2Trash 1.8.0 sentry-sdk 1.9.0 setuptools 56.0.0 SharedArray 3.2.1 shortuuid 1.0.9 six 1.16.0 smmap 5.0.0 soupsieve 2.3.2.post1 stack-data 0.3.0 subprocess32 3.5.4 tensorboard 2.9.1 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorboardX 2.5 termcolor 1.1.0 terminado 0.15.0 threadpoolctl 3.1.0 timm 0.4.9 tinycss2 1.1.1 torch 1.7.1+cu110 torch-cluster 1.6.0 torch-geometric 1.7.0 torch-points-kernels 0.6.10 torch-points3d 1.3.0 torch-scatter 2.0.6 torch-sparse 0.6.14 torchaudio 0.7.2 torchfile 0.1.0 torchnet 0.0.4 torchvision 0.8.2+cu110 tornado 6.2 tqdm 4.64.0 traitlets 5.3.0 typing_extensions 4.3.0 urllib3 1.26.11 visdom 0.1.8.9 wandb 0.8.36 watchdog 2.1.9 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.3.3 Werkzeug 2.2.1 wheel 0.37.1 widgetsnbextension 3.6.1 zipp 3.8.1

Thanks a lot!

W-Q-T commented 2 years ago

did you solve the problem?

W-Q-T commented 2 years ago

Same issue here. Here're is my environment saved with pip list (python 3.7.13):

Package Version


absl-py 1.2.0 altgraph 0.17.2 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 ase 3.22.1 attrs 22.1.0 auto-py-to-exe 2.20.1 backcall 0.2.0 beautifulsoup4 4.11.1 betterpath 0.2.2 bleach 5.0.1 bottle 0.12.21 bottle-websocket 0.2.9 cached-property 1.5.2 cachetools 5.2.0 certifi 2022.6.15 click 8.1.3 configparser 5.2.0 cycler 0.11.0 debugpy 1.6.2 decorator 5.1.1 defusedxml 0.7.1 docker-pycreds 0.4.0 Eel 0.14.0 entrypoints 0.4 fastjsonschema 2.16.1 filelock 3.7.1 future 0.18.2 gdown 3.15.0 gevent 21.12.0 gevent-websocket 0.10.1 gitdb 4.0.9 GitPython 3.1.27 google-auth 2.9.1 google-auth-oauthlib 0.4.6 googledrivedownloader 0.4 gql 0.2.0 graphql-core 1.1 greenlet 1.1.2 grpcio 1.48.0 h5py 3.2.1 hydra-core 0.11.3 imageio 2.20.0 importlib-metadata 4.11.4 importlib-resources 5.9.0 ipykernel 6.15.1 ipython 7.34.0 ipython-genutils 0.2.0 ipywidgets 7.7.1 isodate 0.6.1 jedi 0.18.1 Jinja2 3.1.2 joblib 1.1.0 jsonpatch 1.32 jsonpointer 2.3 jsonschema 4.8.0 jupyter-client 7.3.4 jupyter-core 4.11.1 jupyterlab-pygments 0.2.2 jupyterlab-widgets 1.1.1 kiwisolver 1.4.4 l 0.11.0 llvmlite 0.39.0 Markdown 3.4.1 MarkupSafe 2.1.1 matplotlib 3.4.2 matplotlib-inline 0.1.3 mistune 0.8.4 nbclient 0.6.6 nbconvert 6.5.0 nbformat 5.4.0 nest-asyncio 1.5.5 networkx 2.6.3 notebook 6.4.12 numba 0.56.0 numpy 1.21.6 nvidia-ml-py3 7.352.0 oauthlib 3.2.0 omegaconf 1.4.1 open3d 0.10.0.0 packaging 21.3 pandas 1.3.5 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.1.0 pip 22.2.1 plyfile 0.7.4 pointops2 0.0.0 prometheus-client 0.14.1 promise 2.3 prompt-toolkit 3.0.30 protobuf 3.20.0 psutil 5.9.1 ptyprocess 0.7.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 Pygments 2.12.0 pyinstaller 5.1 pyinstaller-hooks-contrib 2022.7 pyparsing 3.0.9 pyrsistent 0.18.1 python-dateutil 2.8.2 python-louvain 0.16 pytorch-metric-learning 0.9.99 pytz 2022.1 PyWavelets 1.3.0 PyYAML 6.0 pyzmq 23.2.0 rdflib 6.2.0 requests-oauthlib 1.3.1 rsa 4.9 scikit-image 0.16.2 scikit-learn 1.0.2 scipy 1.6.3 Send2Trash 1.8.0 sentry-sdk 1.9.0 setuptools 51.1.0.post20201221 SharedArray 3.2.1 shortuuid 1.0.9 six 1.16.0 smmap 5.0.0 soupsieve 2.3.2.post1 subprocess32 3.5.4 tensorboard 2.9.1 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorboardX 2.5 termcolor 1.1.0 terminado 0.15.0 threadpoolctl 3.1.0 timm 0.4.9 tinycss2 1.1.1 torch 1.7.1 torch-cluster 1.6.0 torch-geometric 1.7.0 torch-points-kernels 0.6.10 torch-points3d 1.3.0 torch-scatter 2.0.6 torch-sparse 0.6.14 torchfile 0.1.0 torchnet 0.0.4 torchvision 0.8.2 tornado 6.2 traitlets 5.3.0 typing_extensions 4.2.0 vcversioner 2.16.0.0 visdom 0.1.8.9 wandb 0.8.36 watchdog 2.1.9 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.3.3 Werkzeug 2.2.1 wheel 0.37.1 whichcraft 0.6.1 widgetsnbextension 3.6.1 zipp 3.8.0 zope.event 4.5.0 zope.interface 5.4.0


I replaced the version of torch-sparse with 0.6.12 and the problem was solved

luislofer89 commented 2 years ago

Replacing torch-sparse with version 0.6.12 works for me too