benbogin / spider-schema-gnn

Author implementation of the paper "Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsing"
136 stars 45 forks source link

Problem With torch_sparse #12

Closed patilaum closed 5 years ago

patilaum commented 5 years ago

following are the logs when I installed torch_sparse==0.2.1

2019-08-19 18:46:32,077 - INFO - pytorch_pretrained_bert.modeling - Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex . 2019-08-19 18:46:32,480 - INFO - pytorch_transformers.modeling_bert - Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex . 2019-08-19 18:46:32,483 - INFO - pytorch_transformers.modeling_xlnet - Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex . Traceback (most recent call last): File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/bin/allennlp", line 11, in load_entry_point('allennlp===0.8.5-unreleased', 'console_scripts', 'allennlp')() File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/allennlp-0.8.5_unreleased-py3.6.egg/allennlp/run.py", line 18, in run main(prog="allennlp") File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/allennlp-0.8.5_unreleased-py3.6.egg/allennlp/commands/init.py", line 101, in main import_submodules(package_name) File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/allennlp-0.8.5_unreleased-py3.6.egg/allennlp/common/util.py", line 323, in import_submodules module = importlib.import_module(package_name) File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 941, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "./models/semantic_parsing/init.py", line 1, in from models.semantic_parsing.spider_parser import SpiderParser File "./models/semantic_parsing/spider_parser.py", line 18, in from torch_geometric.data import Data, Batch File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/init.py", line 2, in import torch_geometric.nn File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/nn/init.py", line 2, in from .data_parallel import DataParallel File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/nn/data_parallel.py", line 5, in from torch_geometric.data import Batch File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/data/init.py", line 1, in from .data import Data File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/data/data.py", line 7, in from torch_sparse import coalesce File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_sparse/init.py", line 1, in from .coalesce import coalesce File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_sparse/coalesce.py", line 4, in from .utils.unique import unique File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_sparse/utils/unique.py", line 5, in import unique_cuda ModuleNotFoundError: No module named 'unique_cuda'

Got the following error when I installed torch_sparse>=0.2.2

Traceback (most recent call last): File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/bin/allennlp", line 11, in load_entry_point('allennlp===0.8.5-unreleased', 'console_scripts', 'allennlp')() File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/allennlp-0.8.5_unreleased-py3.6.egg/allennlp/run.py", line 18, in run main(prog="allennlp") File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/allennlp-0.8.5_unreleased-py3.6.egg/allennlp/commands/init.py", line 101, in main import_submodules(package_name) File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/allennlp-0.8.5_unreleased-py3.6.egg/allennlp/common/util.py", line 323, in import_submodules module = importlib.import_module(package_name) File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 941, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "./models/semantic_parsing/init.py", line 1, in from models.semantic_parsing.spider_parser import SpiderParser File "./models/semantic_parsing/spider_parser.py", line 18, in from torch_geometric.data import Data, Batch File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/init.py", line 2, in import torch_geometric.nn File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/nn/init.py", line 2, in from .data_parallel import DataParallel File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/nn/data_parallel.py", line 5, in from torch_geometric.data import Batch File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/data/init.py", line 6, in from .sampler import NeighborSampler File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_geometric/data/sampler.py", line 4, in from torch_cluster import neighbor_sampler File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_cluster/init.py", line 1, in from .graclus import graclus_cluster File "/home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_cluster/graclus.py", line 2, in import torch_cluster.graclus_cpu ImportError: /home/aum/IMBS/text2sql/spider-schema-gnn-master/alle/lib/python3.6/site-packages/torch_cluster/graclus_cpu.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1019UndefinedTensorImpl10_singletonE

benbogin commented 5 years ago

Hi, I've also received this non-helpful error before - the way to fix it, as far as I know, is to completely uninstall pytorch and the relevant packages (e.g. torch-scatter) - or to start with a fresh environment. Then you should re-install everything, ensuring you have correctly matching torch/cuda/torch-scatter versions.