I install Graphormer follow the guide:
- To create and activate a conda environment with Python3.9
conda create -n graphormer python=3.9
conda activate graphormer
- Run the following commands
git clone --recursive https://github.com/microsoft/Graphormer.git
cd Graphormer
bash install.sh
- To train a Graphormer-slim on ZINC-500K on a single GPU card
cd examples/property_prediction/
bash zinc.sh
I ran this command for half an hour and got no response:
Occasional reactions occur, but the following error is reported:
2022-03-17 17:00:38 | WARNING | root | The OGB package is out of date. Your version is 1.3.2, while the latest ve
rsion is 1.3.3.
Traceback (most recent call last):
File "/home/linjiayi/anaconda3/envs/graphormer/bin/fairseq-train", line 8, in <module>
sys.exit(cli_main())
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/fairseq_cli/train.py", line 512, in
cli_main
parser = options.get_training_parser()
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/fairseq/options.py", line 38, in get
_training_parser
parser = get_parser("Trainer", default_task)
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/fairseq/options.py", line 234, in ge
t_parser
utils.import_user_module(usr_args)
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/fairseq/utils.py", line 497, in impo
rt_user_module
import_tasks(tasks_path, f"{module_name}.tasks")
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/fairseq/tasks/__init__.py", line 117
, in import_tasks
importlib.import_module(namespace + "." + task_name)
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/linjiayi/Graphormer/graphormer/tasks/graph_prediction.py", line 25, in <module>
from ..data.dataset import (
File "/home/linjiayi/Graphormer/graphormer/data/dataset.py", line 9, in <module>
from .wrapper import MyPygGraphPropPredDataset
File "/home/linjiayi/Graphormer/graphormer/data/wrapper.py", line 6, in <module>
from ogb.graphproppred import PygGraphPropPredDataset
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/ogb/graphproppred/__init__.py", line
5, in <module>
from .dataset_pyg import PygGraphPropPredDataset
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/ogb/graphproppred/dataset_pyg.py", l
ine 1, in <module>
from torch_geometric.data import InMemoryDataset
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/torch_geometric/__init__.py", line 5
, in <module>
import torch_geometric.data
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/torch_geometric/data/__init__.py", l
ine 1, in <module>
from .data import Data
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/torch_geometric/data/data.py", line
8, in <module>
from torch_sparse import coalesce, SparseTensor
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/torch_sparse/__init__.py", line 41,
in <module>
from .tensor import SparseTensor # noqa
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/torch_sparse/tensor.py", line 13, in
<module>
class SparseTensor(object):
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/torch/jit/_script.py", line 1128, in
script
_compile_and_register_class(obj, _rcb, qualified_name)
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/torch/jit/_script.py", line 138, in
_compile_and_register_class
script_class = torch._C._jit_script_class_compile(qualified_name, ast, defaults, rcb)
RuntimeError:
object has no attribute sparse_csr_tensor:
File "/home/linjiayi/anaconda3/envs/graphormer/lib/python3.9/site-packages/torch_sparse/tensor.py", line 511
value = torch.ones(self.nnz(), dtype=dtype, device=self.device())
return torch.sparse_csr_tensor(rowptr, col, value, self.sizes())
~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
I try to train a Graphormer-base on PCQM4M dataset on multiple GPU cards using bash pcqv1.sh
, no response either. Is there a problem with the data set download?
How to solve the problem?