Giter Site home page Giter Site logo

hennyjie / braingb Goto Github PK

View Code? Open in Web Editor NEW
168.0 20.0 43.0 840 KB

Officially Accepted to IEEE Transactions on Medical Imaging (TMI, IF: 11.037) - Special Issue on Geometric Deep Learning in Medical Imaging.

License: MIT License

Python 8.29% MATLAB 90.46% Shell 1.25%
brain-networks gcn graph-convolutional-networks graph-neural-networks network-embedding pytorch ai4health

braingb's Introduction

You Found Me! I am Hejie

Hi there! This is Hejie, a Computer Science PhD student in Data Mining.

  • 🧐 I am studying Graph Mining, Multimodality, and AI for Health.
  • 🤓 I am open to research discussions and potential collaborations, feel free to reach out to me.
  • 🤩 Here is my personal homepage! Homepage

Languages and Tools

tex.png python.png jupyter.png vscode.png django.png pytorch.png linux.png git.png PubMed.png NLPText.png OPenCV.png matlab.png travis.png

My Github States

Top Langs

Source from github-readme-stats

braingb's People

Contributors

ddvd233 avatar hennyjie avatar learningkeqi avatar yangji9181 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

braingb's Issues

No module named 'main'

try to run "python -m main.example_main --dataset_name ABIDE --pooling concat --gcn_mp_type edge_node_concate --hidden_dim 256"
but Error while finding module specification for 'main.example_main' (ModuleNotFoundError: No module named 'main')
how to fix it?
thanks

Installation errors

Hi,

If I try to install BrainGB in a new conda environment (conda create -n braingb) on my machine (Ubuntu 20.04.3 LTS, python 3.8.10) with a GPU, via: "pip install BrainGB", I get the following output including errors:

Collecting BrainGB
  Using cached BrainGB-1.0.3-py3-none-any.whl (18 kB)
Collecting numpy>=1.19.5
  Using cached numpy-1.24.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Collecting torch>=1.10.2
  Using cached torch-2.0.1-cp311-cp311-manylinux1_x86_64.whl (619.9 MB)
Collecting scikit-learn>=0.24.2
  Using cached scikit_learn-1.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB)
Collecting networkx>=2.5.1
  Using cached networkx-3.1-py3-none-any.whl (2.1 MB)
Collecting node2vec>=0.4.3
  Using cached node2vec-0.4.6-py3-none-any.whl (7.0 kB)
Collecting scipy
  Using cached scipy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.1 MB)
Collecting torch-geometric
  Using cached torch_geometric-2.3.1.tar.gz (661 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting torch-scatter
  Using cached torch_scatter-2.1.1.tar.gz (107 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-a_jou45r/torch-scatter_83b3c88b392349f08eac35a458cb4c7b/setup.py", line 8, in <module>
          import torch
      ModuleNotFoundError: No module named 'torch'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

If I instead try to install BrainGB via: "pip install -r requirements.txt" (Ubuntu 20.04.3 LTS, python 3.8.10) I get the following output:

ERROR: Could not find a version that satisfies the requirement torch~=1.10.2 (from versions: 1.13.0, 1.13.1, 2.0.0, 2.0.1)
ERROR: No matching distribution found for torch~=1.10.2

If I instead try to create a conda env via: "conda create -n braingb anaconda" (Ubuntu 20.04.3 LTS, Python 3.8.16) then "pip install BrainGB", I get the following output with errors:

Collecting braingb
  Using cached BrainGB-1.0.3-py3-none-any.whl (18 kB)
Collecting torch-scatter
  Using cached torch_scatter-2.1.1.tar.gz (107 kB)
  Preparing metadata (setup.py) ... done
Collecting torch-geometric
  Using cached torch_geometric-2.3.1.tar.gz (661 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting node2vec>=0.4.3
  Using cached node2vec-0.4.6-py3-none-any.whl (7.0 kB)
Requirement already satisfied: networkx>=2.5.1 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from braingb) (2.8.4)
Requirement already satisfied: torch>=1.10.2 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from braingb) (1.12.1)
Requirement already satisfied: scipy in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from braingb) (1.10.0)
Requirement already satisfied: numpy>=1.19.5 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from braingb) (1.23.5)
Requirement already satisfied: scikit-learn>=0.24.2 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from braingb) (1.2.1)
Collecting torch-sparse
  Using cached torch_sparse-0.6.17.tar.gz (209 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: tqdm<5.0.0,>=4.55.1 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from node2vec>=0.4.3->braingb) (4.64.1)
Requirement already satisfied: gensim<5.0.0,>=4.1.2 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from node2vec>=0.4.3->braingb) (4.3.0)
Requirement already satisfied: joblib<2.0.0,>=1.1.0 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from node2vec>=0.4.3->braingb) (1.1.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from scikit-learn>=0.24.2->braingb) (2.2.0)
Requirement already satisfied: typing_extensions in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from torch>=1.10.2->braingb) (4.4.0)
Requirement already satisfied: jinja2 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from torch-geometric->braingb) (3.1.2)
Requirement already satisfied: requests in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from torch-geometric->braingb) (2.28.1)
Requirement already satisfied: pyparsing in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from torch-geometric->braingb) (3.0.9)
Requirement already satisfied: psutil>=5.8.0 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from torch-geometric->braingb) (5.9.0)
Requirement already satisfied: smart-open>=1.8.1 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from gensim<5.0.0,>=4.1.2->node2vec>=0.4.3->braingb) (5.2.1)
Collecting FuzzyTM>=0.4.0
  Using cached FuzzyTM-2.0.5-py3-none-any.whl (29 kB)
Requirement already satisfied: MarkupSafe>=2.0 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from jinja2->torch-geometric->braingb) (2.1.1)
Requirement already satisfied: certifi>=2017.4.17 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from requests->torch-geometric->braingb) (2022.12.7)
Requirement already satisfied: idna<4,>=2.5 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from requests->torch-geometric->braingb) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from requests->torch-geometric->braingb) (1.26.14)
Requirement already satisfied: charset-normalizer<3,>=2 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from requests->torch-geometric->braingb) (2.0.4)
Collecting pyfume
  Using cached pyFUME-0.2.25-py3-none-any.whl (67 kB)
Requirement already satisfied: pandas in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from FuzzyTM>=0.4.0->gensim<5.0.0,>=4.1.2->node2vec>=0.4.3->braingb) (1.5.3)
Requirement already satisfied: python-dateutil>=2.8.1 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from pandas->FuzzyTM>=0.4.0->gensim<5.0.0,>=4.1.2->node2vec>=0.4.3->braingb) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from pandas->FuzzyTM>=0.4.0->gensim<5.0.0,>=4.1.2->node2vec>=0.4.3->braingb) (2022.7)
Collecting simpful
  Using cached simpful-2.11.0-py3-none-any.whl (32 kB)
Collecting fst-pso
  Using cached fst_pso-1.8.1-py3-none-any.whl
Requirement already satisfied: six>=1.5 in /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages (from python-dateutil>=2.8.1->pandas->FuzzyTM>=0.4.0->gensim<5.0.0,>=4.1.2->node2vec>=0.4.3->braingb) (1.16.0)
Collecting miniful
  Using cached miniful-0.0.6-py3-none-any.whl
Building wheels for collected packages: torch-geometric, torch-scatter, torch-sparse
  Building wheel for torch-geometric (pyproject.toml) ... done
  Created wheel for torch-geometric: filename=torch_geometric-2.3.1-py3-none-any.whl size=910459 sha256=732e7d13bc8a732818661a209b0d3a48adfba99695a0e8cf7b837314916c047d
  Stored in directory: /home/aritche/.cache/pip/wheels/b5/5d/40/7c7d9ae359e1ebb834f9fcc0b8a235c4dfe31a166b41279693
  Building wheel for torch-scatter (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [47 lines of output]
      No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/__init__.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/segment_coo.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/testing.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/placeholder.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/segment_csr.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/scatter.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/utils.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      creating build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      copying torch_scatter/composite/__init__.py -> build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      copying torch_scatter/composite/logsumexp.py -> build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      copying torch_scatter/composite/softmax.py -> build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      copying torch_scatter/composite/std.py -> build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      running egg_info
      writing torch_scatter.egg-info/PKG-INFO
      writing dependency_links to torch_scatter.egg-info/dependency_links.txt
      writing requirements to torch_scatter.egg-info/requires.txt
      writing top-level names to torch_scatter.egg-info/top_level.txt
      reading manifest file 'torch_scatter.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'test'
      adding license file 'LICENSE'
      writing manifest file 'torch_scatter.egg-info/SOURCES.txt'
      running build_ext
      building 'torch_scatter._segment_coo_cpu' extension
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/csrc
      creating build/temp.linux-x86_64-cpython-38/csrc/cpu
      gcc -pthread -B /home/aritche/miniconda3/envs/braingb/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_PYTHON -Icsrc -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/TH -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/THC -I/home/aritche/miniconda3/envs/braingb/include/python3.8 -c csrc/cpu/segment_coo_cpu.cpp -o build/temp.linux-x86_64-cpython-38/csrc/cpu/segment_coo_cpu.o -O3 -Wno-sign-compare -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1016\" -DTORCH_EXTENSION_NAME=_segment_coo_cpu -D_GLIBCXX_USE_CXX11_ABI=1 -std=gnu++14
      cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
      In file included from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/python.h:12,
                       from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/extension.h:6,
                       from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:6,
                       from csrc/cpu/../extensions.h:2,
                       from csrc/cpu/segment_coo_cpu.h:3,
                       from csrc/cpu/segment_coo_cpu.cpp:1:
      /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/utils/pybind.h:7:10: fatal error: pybind11/pybind11.h: No such file or directory
          7 | #include <pybind11/pybind11.h>
            |          ^~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for torch-scatter
  Running setup.py clean for torch-scatter
  Building wheel for torch-sparse (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [70 lines of output]
      No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/index_select.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/sample.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/storage.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/bandwidth.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/mul.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/convert.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/narrow.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/reduce.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/typing.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/spadd.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/__init__.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/masked_select.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/testing.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/tensor.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/spspmm.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/matmul.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/cat.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/rw.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/coalesce.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/add.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/select.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/metis.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/diag.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/saint.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/spmm.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/eye.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/transpose.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/utils.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      copying torch_sparse/permute.py -> build/lib.linux-x86_64-cpython-38/torch_sparse
      running egg_info
      writing torch_sparse.egg-info/PKG-INFO
      writing dependency_links to torch_sparse.egg-info/dependency_links.txt
      writing requirements to torch_sparse.egg-info/requires.txt
      writing top-level names to torch_sparse.egg-info/top_level.txt
      reading manifest file 'torch_sparse.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'third_party/parallel-hashmap/css'
      warning: no previously-included files matching '*' found under directory 'third_party/parallel-hashmap/html'
      warning: no previously-included files matching '*' found under directory 'third_party/parallel-hashmap/tests'
      warning: no previously-included files matching '*' found under directory 'third_party/parallel-hashmap/examples'
      warning: no previously-included files matching '*' found under directory 'third_party/parallel-hashmap/benchmark'
      warning: no previously-included files matching '*' found under directory 'test'
      warning: no previously-included files matching '*' found under directory 'benchmark'
      adding license file 'LICENSE'
      writing manifest file 'torch_sparse.egg-info/SOURCES.txt'
      running build_ext
      building 'torch_sparse._neighbor_sample_cpu' extension
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/csrc
      creating build/temp.linux-x86_64-cpython-38/csrc/cpu
      gcc -pthread -B /home/aritche/miniconda3/envs/braingb/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_PYTHON -Icsrc -Ithird_party/parallel-hashmap -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/TH -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/THC -I/home/aritche/miniconda3/envs/braingb/include/python3.8 -c csrc/cpu/neighbor_sample_cpu.cpp -o build/temp.linux-x86_64-cpython-38/csrc/cpu/neighbor_sample_cpu.o -O3 -Wno-sign-compare -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1016\" -DTORCH_EXTENSION_NAME=_neighbor_sample_cpu -D_GLIBCXX_USE_CXX11_ABI=1 -std=gnu++14
      cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
      In file included from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/python.h:12,
                       from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/extension.h:6,
                       from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:6,
                       from csrc/cpu/../extensions.h:2,
                       from csrc/cpu/neighbor_sample_cpu.h:3,
                       from csrc/cpu/neighbor_sample_cpu.cpp:1:
      /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/utils/pybind.h:7:10: fatal error: pybind11/pybind11.h: No such file or directory
          7 | #include <pybind11/pybind11.h>
            |          ^~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for torch-sparse
  Running setup.py clean for torch-sparse
Successfully built torch-geometric
Failed to build torch-scatter torch-sparse
Installing collected packages: torch-scatter, torch-sparse, simpful, miniful, torch-geometric, fst-pso, pyfume, FuzzyTM, node2vec, braingb
  Running setup.py install for torch-scatter ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for torch-scatter did not run successfully.
  │ exit code: 1
  ╰─> [49 lines of output]
      No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
      running install
      /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/__init__.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/segment_coo.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/testing.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/placeholder.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/segment_csr.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/scatter.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      copying torch_scatter/utils.py -> build/lib.linux-x86_64-cpython-38/torch_scatter
      creating build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      copying torch_scatter/composite/__init__.py -> build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      copying torch_scatter/composite/logsumexp.py -> build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      copying torch_scatter/composite/softmax.py -> build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      copying torch_scatter/composite/std.py -> build/lib.linux-x86_64-cpython-38/torch_scatter/composite
      running egg_info
      writing torch_scatter.egg-info/PKG-INFO
      writing dependency_links to torch_scatter.egg-info/dependency_links.txt
      writing requirements to torch_scatter.egg-info/requires.txt
      writing top-level names to torch_scatter.egg-info/top_level.txt
      reading manifest file 'torch_scatter.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'test'
      adding license file 'LICENSE'
      writing manifest file 'torch_scatter.egg-info/SOURCES.txt'
      running build_ext
      building 'torch_scatter._segment_coo_cpu' extension
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/csrc
      creating build/temp.linux-x86_64-cpython-38/csrc/cpu
      gcc -pthread -B /home/aritche/miniconda3/envs/braingb/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_PYTHON -Icsrc -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/TH -I/home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/THC -I/home/aritche/miniconda3/envs/braingb/include/python3.8 -c csrc/cpu/segment_coo_cpu.cpp -o build/temp.linux-x86_64-cpython-38/csrc/cpu/segment_coo_cpu.o -O3 -Wno-sign-compare -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1016\" -DTORCH_EXTENSION_NAME=_segment_coo_cpu -D_GLIBCXX_USE_CXX11_ABI=1 -std=gnu++14
      cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
      In file included from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/python.h:12,
                       from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/extension.h:6,
                       from /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:6,
                       from csrc/cpu/../extensions.h:2,
                       from csrc/cpu/segment_coo_cpu.h:3,
                       from csrc/cpu/segment_coo_cpu.cpp:1:
      /home/aritche/miniconda3/envs/braingb/lib/python3.8/site-packages/torch/include/torch/csrc/utils/pybind.h:7:10: fatal error: pybind11/pybind11.h: No such file or directory
          7 | #include <pybind11/pybind11.h>
            |          ^~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> torch-scatter

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

If I instead try to create a conda env via: "conda create -n braingb anaconda" (Ubuntu 20.04.3 LTS, Python 3.8.16) then "pip install -r requirements.txt", it runs almost entirely without error, but at the end the following error is returned:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
gensim 4.3.0 requires FuzzyTM>=0.4.0, which is not installed.
Successfully installed PyYAML-5.4.1 PythonWebHDFS-0.2.3 astor-0.8.1 contextlib2-21.6.0 h5py-3.6.0 json-tricks-3.16.1 libsvm-3.23.0.4 matplotlib-3.4.3 networkx-2.6.3 nni-2.10 nose-1.3.7 numpy-1.22.4 pandas-1.4.4 prettytable-3.7.0 responses-0.23.1 schema-0.7.5 scikit-learn-1.0.2 scipy-1.7.3 simplejson-3.19.1 tensorly-0.6.0 torch-1.10.2 torch-geometric-2.0.4 tqdm-4.62.3 typeguard-4.0.0 types-PyYAML-6.0.12.9 websockets-11.0.3

coacher

Where can I download VG_paths_8.npy and other files in the coacher project

IndexError

Hello. when i run this code on cuda environment this error happend. would you please help me fixing it?
python -m examples.example_main --dataset_name ABIDE --pooling concat --gcn_mp_type edge_node_concate --hidden_dim 256


(base) C:\Users\Tandi\Downloads\BrainGB>python -m examples.example_main --dataset_name ABIDE --pooling concat --gcn_mp_type edge_node_concate --hidden_dim 256
Processing...
Done!
seed for seed_everything(): 767955
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Tandi\Downloads\BrainGB\examples\example_main.py", line 149, in <module>
    main(parser.parse_args())
  File "C:\Users\Tandi\Downloads\BrainGB\examples\example_main.py", line 69, in main
    train_set, test_set = dataset[train_index], dataset[test_index]
                          ~~~~~~~^^^^^^^^^^^^^
  File "C:\Users\Tandi\anaconda3\Lib\site-packages\torch_geometric\data\dataset.py", line 268, in __getitem__
    return self.index_select(idx)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tandi\anaconda3\Lib\site-packages\torch_geometric\data\dataset.py", line 306, in index_select
    raise IndexError(
IndexError: Only slices (':'), list, tuples, torch.tensor and np.ndarray of dtype long or bool are valid indices (got 'ndarray')

Edge attribute parameter

Hi, thank you for sharing the work!

It seems that the model requires an edge attribute as shown in brainnn.py. Could you suggest how to choose appropriate edge attribute parameters? And if we wish to exclude the edge attribute, can we simply replace it with 'None'?

ImportError

Hi, when I try your example code

from BrainGB import GAT, GCN, BrainNN, GCN

It pops up the following error message

ImportError: cannot import name 'GAT' from 'BrainGB' (/home/cxh/miniconda3/envs/bit/lib/python3.9/site-packages/BrainGB/__init__.py)

Are there any other prerequisite packages needed?

Dataset construction link is broken

First of all, thanks for such a great paper and package!

The link that is supposed to contain the instructions for creating our own dataset is broken:
https://brainnet.us/instructions/

If the fixing of that would take some considerable time, in the mean time could you please let me know the file format and structure that the dataset should have? I already have some fMRI functional connectivity matrices from another dataset and I'd like to test your codes to check the performance on classification.

Dataset Construction Link is still Broken!

Hi, Thank you sharing such a great project and insightful article and code. However, dataset reconstruction link is broken, and I can't find here.

Also, Could you please elaborate what should be the shape the dataset before input like for ABIDE dataset.

`
def load_data_abide(abide_path):

data = np.load(abide_path + '/abide.npy', allow_pickle=True).item()

final_pearson = data["corr"]

labels = data["label"]

return final_pearson, labels

`

How did you construct the abide.npy file, like data shape and structure of it.

Thanks!!

GAT runtime error

Thank you very much for your meaningful work! However, when I change the GCN to GAT in the config file, the following error is reported, I made attempts but still did not run successfully.

Below is my error log:

Processing...
Done!
seed for seed_everything(): 2024
2024-05-25 23:48:45,472 - Loaded dataset: ABIDE
0%| | 0/26 [00:00<?, ?it/s]edge_index shape: torch.Size([2, 1280000])
x shape: torch.Size([6400, 200])
Maximum index in edge_index: 6399
edge_attr: torch.Size([1280000])
0%| | 0/26 [00:00<?, ?it/s]
Traceback (most recent call last):
File "D:/GraduateStudent/code/BrainGB-master/examples/example_main.py", line 152, in
main(parser.parse_args())
File "D:/GraduateStudent/code/BrainGB-master/examples/example_main.py", line 78, in main
test_micro, test_auc, test_macro = train_and_evaluate(model, train_loader, test_loader,
File "D:\GraduateStudent\code\BrainGB-master\examples\train_and_evaluate.py", line 26, in train_and_evaluate
out = model(data)
File "D:\zj\miniconda\envs\Dual-HINet\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\GraduateStudent\code\BrainGB-master\src\models\brainnn.py", line 18, in forward
g = self.gnn(x, edge_index, edge_attr, batch)
File "D:\zj\miniconda\envs\Dual-HINet\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\GraduateStudent\code\BrainGB-master\src\models\gat.py", line 147, in forward
z = conv(z, edge_index, edge_attr)
File "D:\zj\miniconda\envs\Dual-HINet\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\28334\AppData\Local\Temp\torch_geometric.nn.sequential_f0afbb_syfjdr4d.py", line 23, in forward
x = self.module_0(x, edge_index, edge_attr)
File "D:\zj\miniconda\envs\Dual-HINet\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\zj\miniconda\envs\Dual-HINet\lib\site-packages\torch_geometric\nn\conv\gat_conv.py", line 341, in forward
out = self.propagate(edge_index, x=x, alpha=alpha, size=size)
File "D:\zj\miniconda\envs\Dual-HINet\lib\site-packages\torch_geometric\nn\conv\message_passing.py", line 538, in propagate
coll_dict = self._collect(self._user_args, edge_index,
File "D:\zj\miniconda\envs\Dual-HINet\lib\site-packages\torch_geometric\nn\conv\message_passing.py", line 399, in _collect
self._set_size(size, dim, data)
File "D:\zj\miniconda\envs\Dual-HINet\lib\site-packages\torch_geometric\nn\conv\message_passing.py", line 298, in _set_size
raise ValueError(
ValueError: Encountered tensor with size 1280000 in dimension 0, but expected size 6400.

Process finished with exit code 1

A bug in the brain_dataset.py

Hi,

This is excellent work, but I found a bug in brain_dataset.py.
At the function named dense_to_ind_val, torch.isnan(adj)==0 will make every existing value turn into True, causing the index fully True which means every brain network is fully connected.

Step 4: Label Generation reg_FSROI_Jan2014.sh

I try to run you preprocessing steps for PPMI dataset. And faced with errors on the Label Generation step 4.

Could you tell me at what step and how do you get brainmask.mgz, rawavg.mgz, aparc+aseg.mgz files for your script reg_FSROI_Jan2014.sh ? Did you use dt-recon ?

datasets downloader

ABCD/abcd_rest-timeseires-HCP2016.npy
514_timeseries.npy
/abide.npy
How do I get these downloaded files? Sorry, I'm a novice. I visited the official data website, but I have no clue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.