RuntimeError: Not compiled with METIS support
I would like to try pyg_autoscale. I have tried to install it on my mac M1 Max with MacOS 13.2.1. Here is the sequence of commands that I used:
conda create --name playground_pygas python=3.8
conda activate playground_pygas
pip3 install torch torchvision
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
pip install torch-geometric
pip install git+https://github.com/rusty1s/pyg_autoscale.git
According to https://pytorch.org/get-started/locally/ the command pip3 install torch torchvision install current stable (2.0.0) PyTorch. Other commands according to https://github.com/rusty1s/pyg_autoscale#readme.
All packages install successfully, but when I try one of the example scripts (for example https://github.com/rusty1s/pyg_autoscale/blob/master/examples/train_gcn.py I get the following error:
mputing METIS partitioning with 40 parts... Traceback (most recent call last):
File "train_gcn.py", line 25, in <module>
perm, ptr = metis(data.adj_t, num_parts=40, log=True)
File "/Users/marco/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch_geometric_autoscale/metis.py", line 31, in metis
cluster = partition_fn(rowptr, col, None, num_parts, recursive)
File "/Users/marco/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/_ops.py", line 502, in __call__
return self._op(*args, **kwargs or {})
RuntimeError: Not compiled with METIS support
What am I doing wrong? Any help is much appreciated. Thank you!
Can you show me the installation log of torch-sparse? This suggests that you are somehow installing from source :(
Can you show me the installation log of
torch-sparse? This suggests that you are somehow installing from source :(
Not sure, is this what you are looking for:
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html (playground_pygas)
Looking in links: https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
Collecting torch-sparse
Using cached torch_sparse-0.6.17-cp38-cp38-macosx_11_0_arm64.whl
Collecting scipy
Using cached scipy-1.10.1-cp38-cp38-macosx_12_0_arm64.whl (28.8 MB)
Requirement already satisfied: numpy<1.27.0,>=1.19.5 in ./miniconda3/envs/playground_pygas/lib/python3.8/site-packages (from scipy->torch-sparse) (1.24.2)
Installing collected packages: scipy, torch-sparse
Successfully installed scipy-1.10.1 torch-sparse-0.6.17
Can you run
pip uninstall torch-sparse
pip install --verbose torch-sparse -f https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
Just using --verbose in pip install did not make any difference with respect to above output, so I did -v -v -v (according to https://pip.pypa.io/en/stable/cli/pip/#cmdoption-v):
pip install -v -v -v torch-sparse -f https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html (playground_pygas)
Using pip 23.0.1 from /Users/marco/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/pip (python 3.8)
Non-user install because site-packages writeable
Created temporary directory: /private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-build-tracker-rf5jw5bj
Initialized build tracking at /private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-build-tracker-rf5jw5bj
Created build tracker: /private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-build-tracker-rf5jw5bj
Entered build tracker: /private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-build-tracker-rf5jw5bj
Created temporary directory: /private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-install-8_jfygy5
Created temporary directory: /private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-ephem-wheel-cache-fexks8qo
Looking in links: https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
2 location(s) to search for versions of torch-sparse:
* https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
* https://pypi.org/simple/torch-sparse/
Fetching project page and analyzing links: https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
Getting page https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
Looking up "https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pytorch-geometric.com:443
https://pytorch-geometric.com:443 "GET /whl/torch-2.0.0+cpu.html HTTP/1.1" 304 0
Fetched page https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html as text/html
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/pyg_lib-0.2.0%2Bpt20-cp310-cp310-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/pyg_lib-0.2.0%2Bpt20-cp311-cp311-macosx_10_15_universal2.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/pyg_lib-0.2.0%2Bpt20-cp38-cp38-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/pyg_lib-0.2.0%2Bpt20-cp39-cp39-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/pyg_lib-0.2.0%2Bpt20cpu-cp310-cp310-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/pyg_lib-0.2.0%2Bpt20cpu-cp311-cp311-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/pyg_lib-0.2.0%2Bpt20cpu-cp38-cp38-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/pyg_lib-0.2.0%2Bpt20cpu-cp39-cp39-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1%2Bpt20cpu-cp310-cp310-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1%2Bpt20cpu-cp310-cp310-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1%2Bpt20cpu-cp311-cp311-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1%2Bpt20cpu-cp311-cp311-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1%2Bpt20cpu-cp38-cp38-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1%2Bpt20cpu-cp38-cp38-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1%2Bpt20cpu-cp39-cp39-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1%2Bpt20cpu-cp39-cp39-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1-cp310-cp310-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1-cp311-cp311-macosx_10_9_universal2.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1-cp38-cp38-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_cluster-1.6.1-cp39-cp39-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1%2Bpt20cpu-cp310-cp310-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1%2Bpt20cpu-cp310-cp310-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1%2Bpt20cpu-cp311-cp311-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1%2Bpt20cpu-cp311-cp311-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1%2Bpt20cpu-cp38-cp38-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1%2Bpt20cpu-cp38-cp38-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1%2Bpt20cpu-cp39-cp39-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1%2Bpt20cpu-cp39-cp39-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1-cp310-cp310-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1-cp311-cp311-macosx_10_9_universal2.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1-cp38-cp38-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_scatter-2.1.1-cp39-cp39-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp310-cp310-linux_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17%2Bpt20cpu-cp310-cp310-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp310-cp310-win_amd64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17%2Bpt20cpu-cp310-cp310-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp311-cp311-linux_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17%2Bpt20cpu-cp311-cp311-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp311-cp311-win_amd64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17%2Bpt20cpu-cp311-cp311-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp38-cp38-linux_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17%2Bpt20cpu-cp38-cp38-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp38-cp38-win_amd64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17%2Bpt20cpu-cp38-cp38-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp39-cp39-linux_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17%2Bpt20cpu-cp39-cp39-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp39-cp39-win_amd64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17%2Bpt20cpu-cp39-cp39-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp310-cp310-macosx_10_15_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17-cp310-cp310-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp311-cp311-macosx_10_9_universal2) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17-cp311-cp311-macosx_10_9_universal2.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp38-cp38-macosx_10_15_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17-cp38-cp38-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: none of the wheel's tags (cp39-cp39-macosx_10_15_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_sparse-0.6.17-cp39-cp39-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2%2Bpt20cpu-cp310-cp310-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2%2Bpt20cpu-cp310-cp310-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2%2Bpt20cpu-cp311-cp311-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2%2Bpt20cpu-cp311-cp311-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2%2Bpt20cpu-cp38-cp38-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2%2Bpt20cpu-cp38-cp38-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2%2Bpt20cpu-cp39-cp39-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2%2Bpt20cpu-cp39-cp39-win_amd64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2-cp310-cp310-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2-cp311-cp311-macosx_10_9_universal2.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2-cp38-cp38-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Skipping link: wrong project name (not torch-sparse): https://data.pyg.org/whl/torch-2.0.0%2Bcpu/torch_spline_conv-1.2.2-cp39-cp39-macosx_10_15_x86_64.whl (from https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html)
Fetching project page and analyzing links: https://pypi.org/simple/torch-sparse/
Getting page https://pypi.org/simple/torch-sparse/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/torch-sparse/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/torch-sparse/ HTTP/1.1" 304 0
Fetched page https://pypi.org/simple/torch-sparse/ as application/vnd.pypi.simple.v1+json
Found link https://files.pythonhosted.org/packages/21/a6/af5865f7bc2dc45ea789ebb35bdf5d84c05e140d7d2ec7e5823d24db176f/torch_sparse-0.1.0.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.1.0
Found link https://files.pythonhosted.org/packages/02/4f/89bcb156022a3960c4db852915c64ea78b4e993e0f8d7a83e60e6819fc11/torch_sparse-0.2.0.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.2.0
Found link https://files.pythonhosted.org/packages/8f/41/98db80cc9d9345c76445393661ce4dd3e08fc46fb17028e7706612063e4d/torch_sparse-0.2.1.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.2.1
Found link https://files.pythonhosted.org/packages/73/5b/5b7b6c66148afaa5e2ed8a3e18e109361957d28e67032d92cb282d173f32/torch_sparse-0.2.2.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.2.2
Found link https://files.pythonhosted.org/packages/43/2a/bb2ead5b33c6932937c6c74199ebecd72bd4b3ab224842a50366e5b2af4a/torch_sparse-0.2.3.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.2.3
Found link https://files.pythonhosted.org/packages/73/72/e374662f6f47d9ac0e082a6d5c18d14e15c52863e89c6bc6957a0d2ed026/torch_sparse-0.2.4.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.2.4
Found link https://files.pythonhosted.org/packages/b0/0a/2ff678e0d04e524dd2cf990a6202ced8c0ffe3fe6b08e02f25cc9fd27da0/torch_sparse-0.4.0.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.4.0
Found link https://files.pythonhosted.org/packages/c7/3e/aa5449787910283d846a7c739899ccf8c53c914f8a7aee7bc500a32dc091/torch_sparse-0.4.1.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.4.1
Found link https://files.pythonhosted.org/packages/7d/c5/1f73917168aa9816f41e0696f266fa07d0ebfe8d25c3e63a0f08440534b9/torch_sparse-0.4.2.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.4.2
Found link https://files.pythonhosted.org/packages/08/4e/a268613fa6a92ffbc65b89e66fc8be5590801937185007f0f7bcb75ea21f/torch_sparse-0.4.3.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.4.3
Found link https://files.pythonhosted.org/packages/0e/bf/6242893c898621e7e4756e1ad298e903df6dfae208aec1c32adf8cfd1f7f/torch_sparse-0.4.4.tar.gz (from https://pypi.org/simple/torch-sparse/), version: 0.4.4
Found link https://files.pythonhosted.org/packages/92/80/7137d14dac46d515373d8b3eb47e2565ecfd646ba8658a6a6a1c24e49a2c/torch_sparse-0.5.1.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.5.1
Found link https://files.pythonhosted.org/packages/11/17/03bd3a1f056d971e498bd1ad818bbde3dd5409c845ed2ce76186fec65dd2/torch_sparse-0.6.0.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.0
Found link https://files.pythonhosted.org/packages/12/9e/66247cbc250e746d06de35c6eb226ec39f4cb4be46adf6ee27527915910b/torch_sparse-0.6.1.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.1
Found link https://files.pythonhosted.org/packages/dc/65/ee198eae5c517cfc6d05473bf4ec8593830dc61446ffd65fdb7cd3b469ce/torch_sparse-0.6.3.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.3
Found link https://files.pythonhosted.org/packages/92/d4/7261b5ee3ff529ac3652fda2ad9757c0fb3cde514014a9c26fe71bad38e9/torch_sparse-0.6.4.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.4
Found link https://files.pythonhosted.org/packages/18/0d/a0ab465c6fd30318e8ce2c121424fb09573e46eb16231e6fedb6ddd953f5/torch_sparse-0.6.5.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.5
Found link https://files.pythonhosted.org/packages/db/d1/968436c29959c321740ee95f781c961f12b2d23f0ecdbdaaf3ccf64ddc94/torch_sparse-0.6.6.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.6
Found link https://files.pythonhosted.org/packages/ce/c0/f5ccc280629765cf1e97b601426cad6170d00603cf9836ba52f85d44ac27/torch_sparse-0.6.7.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.7
Found link https://files.pythonhosted.org/packages/3c/dd/f34dce6512a3922948c3ac0cf50cceb2eeafeedd34a278d502eb77d07dc0/torch_sparse-0.6.8.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.8
Found link https://files.pythonhosted.org/packages/9a/86/699eb78ea7ce259da7f9953858ec2a064e4e5f5e6bf7de53aa6c8bb8b9a8/torch_sparse-0.6.9.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.9
Found link https://files.pythonhosted.org/packages/c7/49/c97315cd579a19d4e575ca06dd8f79f43c00c9c38658fbe91116cd7909dd/torch_sparse-0.6.10.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.10
Found link https://files.pythonhosted.org/packages/5a/81/f66f60ef6ce915ca54a4fcd0c97ec8a1a802312c1774caf329a866ebbf31/torch_sparse-0.6.11.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.11
Found link https://files.pythonhosted.org/packages/00/40/208c5b8ae34c89403d9da648c9689465880539d95a4ad570ac9d6f301b72/torch_sparse-0.6.12.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.6), version: 0.6.12
Found link https://files.pythonhosted.org/packages/ee/44/b4a1d6d7fa67309781005c0e36723dd0bd745fc1a20c9330796055953b10/torch_sparse-0.6.13.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.7), version: 0.6.13
Found link https://files.pythonhosted.org/packages/ed/f0/8d198555417336fac1b56c23b50699717cfc743f5d6bd5d1ece59695aa4c/torch_sparse-0.6.14.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.7), version: 0.6.14
Found link https://files.pythonhosted.org/packages/6d/79/df42a4bf93191ff44d31ba58eb3ec98a02dfb7402fac34852f864c4b3999/torch_sparse-0.6.15.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.7), version: 0.6.15
Found link https://files.pythonhosted.org/packages/88/e8/9e75676a3415d438fdb354b5ee0ffac777eb447fe4924224beef7529ea43/torch_sparse-0.6.16.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.7), version: 0.6.16
Found link https://files.pythonhosted.org/packages/cb/ff/21d4674bdf232cd7a2bdbbbb04c35ba1cbdf444d4f3331f5d7eb6c5d4a8f/torch_sparse-0.6.17.tar.gz (from https://pypi.org/simple/torch-sparse/) (requires-python:>=3.7), version: 0.6.17
Skipping link: unsupported archive format: .html: https://pytorch-geometric.com/whl/torch-2.0.0+cpu.html
Skipping link: not a file: https://pypi.org/simple/torch-sparse/
Given no hashes to check 29 links for project 'torch-sparse': discarding no candidates
Using cached wheel link: file:///Users/marco/Library/Caches/pip/wheels/22/b4/54/ca8f8938b70218d75f3b96bb1c2126d16521fb5996191b4efe/torch_sparse-0.6.17-cp38-cp38-macosx_11_0_arm64.whl
Collecting torch-sparse
Using cached torch_sparse-0.6.17-cp38-cp38-macosx_11_0_arm64.whl
Added torch-sparse from file:///Users/marco/Library/Caches/pip/wheels/22/b4/54/ca8f8938b70218d75f3b96bb1c2126d16521fb5996191b4efe/torch_sparse-0.6.17-cp38-cp38-macosx_11_0_arm64.whl to build tracker '/private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-build-tracker-rf5jw5bj'
Removed torch-sparse from file:///Users/marco/Library/Caches/pip/wheels/22/b4/54/ca8f8938b70218d75f3b96bb1c2126d16521fb5996191b4efe/torch_sparse-0.6.17-cp38-cp38-macosx_11_0_arm64.whl from build tracker '/private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-build-tracker-rf5jw5bj'
Requirement already satisfied: scipy in /Users/marco/miniconda3/envs/playground_pygas/lib/python3.8/site-packages (from torch-sparse) (1.10.1)
Requirement already satisfied: numpy<1.27.0,>=1.19.5 in /Users/marco/miniconda3/envs/playground_pygas/lib/python3.8/site-packages (from scipy->torch-sparse) (1.24.2)
Created temporary directory: /private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-unpack-u1wd33_7
Installing collected packages: torch-sparse
Successfully installed torch-sparse-0.6.17
Remote version of pip: 23.0.1
Local version of pip: 23.0.1
Was pip installed by pip? False
Removed build tracker: '/private/var/folders/x_/3z3xyvcs3tj071fqts801cg00000gn/T/pip-build-tracker-rf5jw5bj'
Oh, I somehow missed you are on macOS. In this case, the library will get built from source, and METIS needs to be installed beforehand in order to get picked up :(
Two questions:
- You write "the library will get built from source, and METIS needs to be installed beforehand in order to get picked up": can you please tell me how to do that, or point me to a link with howto? Thank you.
- Is is different if I install on RedHat?
You can find instructions here.
I have installed a new conda environment on a RedHat server with CUDA. Installation steps:
conda create --name playground_pygas python=3.8
conda activate playground_pygas
pip3 install torch --index-url https://download.pytorch.org/whl/cu118
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-2.0.0+cu118.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-2.0.0+cu118.html
pip install torch-geometric
pip install git+https://github.com/rusty1s/pyg_autoscale.git
Now I have the following error:
Computing METIS partitioning with 40 parts... Done! [0.03s]
Permuting data... Done! [0.01s]
Traceback (most recent call last):
File "train_gcn.py", line 81, in <module>
train(model, loader, optimizer)
File "train_gcn.py", line 56, in train
out = model(batch.x, batch.adj_t, *args)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch_geometric_autoscale/models/base.py", line 147, in __call__
self.pool.async_pull(hist.emb, None, None, n_id[batch_size:])
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch_geometric_autoscale/pool.py", line 69, in async_pull
self._async_pull(self._pull_index, src, offset, count, index)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch_geometric_autoscale/pool.py", line 75, in _async_pull
read_async(src, offset, count, index, self._cuda_buffer(idx),
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/_ops.py", line 502, in __call__
return self._op(*args, **kwargs or {})
RuntimeError: Not compiled with CUDA support
Looks like PyGAS is compiled without CUDA support. You may find look when installing via
FORCE_CUDA=1 pip install git+https://github.com/rusty1s/pyg_autoscale.git
FORCE_CUDA=1 pip install git+https://github.com/rusty1s/pyg_autoscale.git helped and I can successfully run train_gcn.py and train_gcn2.py, but when I run train_gin.py I get the following error:
Computing METIS partitioning with 10000 parts... Done! [9.03s]
Permuting data... Done! [6.65s]
/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/utils/data/dataloader.py:561: UserWarning: This DataLoader will create 6 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
warnings.warn(_create_warning_msg(
Pre-processing subgraphs... Done! [0.30s]
/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch_geometric/deprecation.py:22: UserWarning: 'data.DataLoader' is deprecated, use 'loader.DataLoader' instead
warnings.warn(out)
Traceback (most recent call last):
File "train_gin.py", line 179, in <module>
loss = train(model, train_loader, optimizer)
File "train_gin.py", line 146, in train
loss.backward()
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/_tensor.py", line 487, in backward
torch.autograd.backward(
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/autograd/__init__.py", line 200, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [29934, 128]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
I have tried to rerun using the hint, that is adding torch.autograd.set_detect_anomaly(True), and this is the result:
Computing METIS partitioning with 10000 parts... Done! [8.97s]
Permuting data... Done! [6.62s]
/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/utils/data/dataloader.py:561: UserWarning: This DataLoader will create 6 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
warnings.warn(_create_warning_msg(
Pre-processing subgraphs... Done! [0.39s]
/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch_geometric/deprecation.py:22: UserWarning: 'data.DataLoader' is deprecated, use 'loader.DataLoader' instead
warnings.warn(out)
/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/autograd/__init__.py:200: UserWarning: Error detected in ReluBackward0. Traceback of forward call that caused the error:
File "train_gin.py", line 179, in <module>
loss = train(model, train_loader, optimizer)
File "train_gin.py", line 144, in train
out, reg = model(batch.x, batch.adj_t, *args)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch_geometric_autoscale/models/base.py", line 149, in __call__
out = self.forward(x, adj_t, batch_size, n_id, offset, count, **kwargs)
File "train_gin.py", line 102, in forward
h = self.mlps[-1](h)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/nn/modules/activation.py", line 103, in forward
return F.relu(input, inplace=self.inplace)
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/nn/functional.py", line 1457, in relu
result = torch.relu(input)
(Triggered internally at ../torch/csrc/autograd/python_anomaly_mode.cpp:114.)
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
Traceback (most recent call last):
File "train_gin.py", line 179, in <module>
loss = train(model, train_loader, optimizer)
File "train_gin.py", line 146, in train
loss.backward()
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/_tensor.py", line 487, in backward
torch.autograd.backward(
File "/u/masbodio/miniconda3/envs/playground_pygas/lib/python3.8/site-packages/torch/autograd/__init__.py", line 200, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [29934, 128]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!
Any idea, please?
Can you try to make this line an out-of-place function. This behavior might have changed due to different PyTorch versions:
h = h.clone()
h += x[:h.size(0)]
Can you try to make this line an out-of-place function. This behavior might have changed due to different PyTorch versions:
h = h.clone() h += x[:h.size(0)]
This does not solve the problem.
Can you change this line here to relu() instead of relu_()?