Comments (5)
If you cannot install pytorch 1.3, just make sure that the pytorch-geometric is up-to-date with the correct pytorch version. You can refer to their document as a reference (https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html)
from gpt-gnn.
I install pytorch 1.4.0 and the relevant pytorch-geometric version . But I got the following problem.
Traceback (most recent call last):
File "pretrain_OAG.py", line 249, in
edge_index.to(device), edge_type.to(device))
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/workspace/GPT-GNN/example_OAG/GPT_GNN/model.py", line 191, in forward
meta_xs = gc(meta_xs, node_type, edge_index, edge_type, edge_time)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/workspace/GPT-GNN/example_OAG/GPT_GNN/conv.py", line 171, in forward
return self.base_conv(meta_xs, node_type, edge_index, edge_type, edge_time)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/workspace/GPT-GNN/example_OAG/GPT_GNN/conv.py", line 57, in forward
edge_type=edge_type, edge_time = edge_time)
File "/opt/conda/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 233, in propagate
kwargs)
File "/opt/conda/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 156, in collect
self.set_size(size, dim, data)
File "/opt/conda/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 119, in set_size
elif the_size != src.size(self.node_dim):
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got -2)
from gpt-gnn.
Hi, acbull, I change to python 3.6.12 and cuda 9.2 version (I use python 3.7 and cuda 10.1 before but I found they are conflict with pytorch 1.3.0)。 I finished 'pip install -r requirement.txt' command successfully , but can not import torch_geometric ==。。。
import torch_geometric
Traceback (most recent call last):
File "", line 1, in
File "/opt/conda/lib/python3.6/site-packages/torch_geometric/init.py", line 2, in
import torch_geometric.nn
File "/opt/conda/lib/python3.6/site-packages/torch_geometric/nn/init.py", line 2, in
from .data_parallel import DataParallel
File "/opt/conda/lib/python3.6/site-packages/torch_geometric/nn/data_parallel.py", line 5, in
from torch_geometric.data import Batch
File "/opt/conda/lib/python3.6/site-packages/torch_geometric/data/init.py", line 1, in
from .data import Data
File "/opt/conda/lib/python3.6/site-packages/torch_geometric/data/data.py", line 7, in
from torch_sparse import coalesce
File "/opt/conda/lib/python3.6/site-packages/torch_sparse/init.py", line 2, in
from .coalesce import coalesce
File "/opt/conda/lib/python3.6/site-packages/torch_sparse/coalesce.py", line 2, in
import torch_scatter
File "/opt/conda/lib/python3.6/site-packages/torch_scatter/init.py", line 3, in
from .mul import scatter_mul
File "/opt/conda/lib/python3.6/site-packages/torch_scatter/mul.py", line 3, in
from torch_scatter.utils.ext import get_func
File "/opt/conda/lib/python3.6/site-packages/torch_scatter/utils/ext.py", line 2, in
import torch_scatter.scatter_cpu
ImportError: /opt/conda/lib/python3.6/site-packages/torch_scatter/scatter_cpu.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1011CPUTensorIdEv
I can not figure out what is the problem, could you please give some advises? or provide more details about your environment,such as your python\cuda version. Thanks a lot ~
from gpt-gnn.
I think the last problem is caused by the conflict of CUDA version. (probably you didn't delete the previous cuda environment cleanly). My experiment is cuda 9.0 with pytorch 3.6.0.
For the first problem, I think it's caused by the softmax function (https://pytorch-geometric.readthedocs.io/en/1.3.1/_modules/torch_geometric/utils/softmax.html)
Seems like it would be better to explicitly pass the total node number to this function, then my code can be run on the latest pytorch_geometric version.
from gpt-gnn.
Thank you for your patient answers~ I finally solved my problem. I am in a docker image with python 3.6.7 and cuda 9.2.148. And here is my solution as a reference if anyone need it. I referred to the HGT DockerFile and make some changes to fit my cuda version, so maybe some packages in the following are not needed.
#CUDA 9.2-specific steps.
conda install -y -c pytorch
cudatoolkit=9.2
"pytorch=1.3.0=py3.6_cuda9.2.148_cudnn7.6.3_0"
&& conda clean -ya
#Install HDF5 Python bindings.
conda install -y h5py=2.8.0
&& conda clean -ya
pip install h5py-cache==1.0
#Install TorchNet, a high-level framework for PyTorch.
pip install torchnet==0.0.4
#Install Requests, a Python library for making HTTP requests.
conda install -y requests=2.19.1
&& conda clean -ya
#Install Graphviz.
conda install -y graphviz=2.40.1 python-graphviz=0.8.4
&& conda clean -ya
#Install PyTorch Geometric.
pip install --no-cache-dir torch-scatter==1.3.0 -f https://pytorch-geometric.com/whl/torch-1.3.0.html
pip install --no-cache-dir torch-sparse==0.4.3
&& pip install --no-cache-dir torch-cluster==1.4.5
&& pip install --no-cache-dir torch-spline-conv==1.1.1 -f https://pytorch-geometric.com/whl/torch-1.3.0.html\
&& pip install torch-geometric===1.3.2
pip install dill==0.3.0
&& pip install numpy==1.16.2
&& pip install pandas==0.24.2
&& pip install tqdm==4.31.1
&& pip install seaborn==0.9.0
&& pip install matplotlib==3.0.3
&& pip install transformers==2.8.0
apt-get install zip -y
pip install texttable
conda install gensim tqdm dill pandas matplotlib seaborn -y
#export TERM=xterm # for using 'top'
from gpt-gnn.
Related Issues (20)
- running time on OAG_CS dataset HOT 3
- time_range for the finetuning experiment HOT 2
- attribute generation for pretrain_OAG
- About the training time
- How to generate a new graph?
- 'node_emb' & 'emb' in graph.node_features
- About Reddit pretraining | NameError: name 'graph' is not defined HOT 1
- IndexError: "index out of range in self" in training on custom dataset HOT 1
- Raise 'IndexError: index out of range in self' when I use HGTConv with my own dataset. HOT 1
- About down load the OAG dataset OAG_ALL HOT 1
- Can't download pretrain-model about Raddit HOT 3
- nothing
- How to generate vfi_vector.csv
- Amazon Review Recommendation Dataset
- error "return RenameUnpickler(file_obj).load() TypeError: an integer is required (got type bytes)" HOT 4
- KeyError: 'emb'
- get training data takes a long time
- How to choose pre-training data HOT 1
- [BUG]Typo int the README.md file about the paramter "--neg_samp_num" HOT 1
- The experimental result on ogbn-mag
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt-gnn.