Yu-Maryland / Gamora

Gamora: Graph Learning based Symbolic Reasoning for Large-Scale Boolean Networks (DAC'23)
Other
47 stars 5 forks source link

neighborloader update #2

Closed puririshi98 closed 1 year ago

puririshi98 commented 1 year ago

on my 2 x a5000 desktop training gets 1.4x speedup inference gets 1.75x speedup

lydiawunan commented 1 year ago

Thanks for the contribution! I tested the code on my macbook as well as a server with A100s and noticed the error: AttributeError: 'GlobalStorage' object has no attribute 'n_id'

I am wondering whether there is any dependency related to PyG version.

puririshi98 commented 1 year ago

hmm yes it seems there is a version conflict, can you pip list so i can see your versions? i am using the pyg 23.07 container from NVIDIA that I develop: https://developer.nvidia.com/pyg-container-early-access

If i can isolate what the version difference is i can create a conditional that uses ur old code if their versions are before a certain number otherwise use the newer code

heres the pip list in that container:

root@riship-dt:/workspace# pip list
Package                   Version
------------------------- --------------------
absl-py                   1.4.0
aiohttp                   3.8.4
aiosignal                 1.3.1
alembic                   1.11.1
apex                      0.1
argon2-cffi               21.3.0
argon2-cffi-bindings      21.2.0
asttokens                 2.2.1
astunparse                1.6.3
async-timeout             4.0.2
attrs                     23.1.0
audioread                 3.0.0
backcall                  0.2.0
beautifulsoup4            4.12.2
black                     23.3.0
bleach                    6.0.0
blinker                   1.4
blis                      0.7.9
Brotli                    1.0.9
cachetools                5.3.1
catalogue                 2.0.8
certifi                   2023.5.7
cffi                      1.15.1
charset-normalizer        3.1.0
click                     8.1.3
cloudpickle               2.2.1
cmaes                     0.9.1
cmake                     3.26.4
colorlog                  6.7.0
comm                      0.1.3
confection                0.1.0
contourpy                 1.1.0
coverage                  7.2.7
cryptography              3.4.8
cubinlinker               0.3.0+2.g155b525
cuda-python               12.1.0rc5+1.g8659927
cudf                      23.6.0
cugraph                   23.6.0
cugraph-dgl               23.6.0
cugraph-service-client    23.6.0
cugraph-service-server    23.6.0
cuml                      23.6.0
cupy-cuda12x              12.1.0
cycler                    0.11.0
cymem                     2.0.7
Cython                    0.29.36
dask                      2023.3.2
dask-cuda                 23.6.0
dask-cudf                 23.6.0
dbus-python               1.2.18
debugpy                   1.6.7
decorator                 5.1.1
defusedxml                0.7.1
distributed               2023.3.2.1
distro                    1.7.0
distro-info               1.1build1
DLLogger                  1.0.0
dm-tree                   0.1.8
einops                    0.6.1
exceptiongroup            1.1.2
execnet                   1.9.0
executing                 1.2.0
expecttest                0.1.3
fastjsonschema            2.17.1
fastrlock                 0.8.1
filelock                  3.12.2
flake8                    6.0.0
flash-attn                1.0.7
fonttools                 4.40.0
frozenlist                1.3.3
fsspec                    2023.6.0
gast                      0.5.4
gevent                    22.10.2
geventhttpclient          2.0.2
google-auth               2.21.0
google-auth-oauthlib      0.4.6
gp                        0.1
graphsurgeon              0.4.6
greenlet                  2.0.2
grpcio                    1.56.0
httplib2                  0.20.2
hypothesis                5.35.1
idna                      3.4
importlib-metadata        6.7.0
iniconfig                 2.0.0
intel-openmp              2021.4.0
ipykernel                 6.24.0
ipython                   8.14.0
ipython-genutils          0.2.0
isort                     5.12.0
jedi                      0.18.2
jeepney                   0.7.1
Jinja2                    3.1.2
joblib                    1.3.0
json5                     0.9.14
jsonschema                4.18.0
jsonschema-specifications 2023.6.1
jupyter_client            8.3.0
jupyter_core              5.3.1
jupyter-tensorboard       0.2.0
jupyterlab                2.3.2
jupyterlab-pygments       0.2.2
jupyterlab-server         1.2.0
jupytext                  1.14.7
keyring                   23.5.0
kiwisolver                1.4.4
langcodes                 3.3.0
launchpadlib              1.10.16
lazr.restfulclient        0.14.4
lazr.uri                  1.0.6
librosa                   0.9.2
lightning-utilities       0.9.0
littleutils               0.2.2
llvmlite                  0.40.1
locket                    1.0.0
Mako                      1.2.4
Markdown                  3.4.3
markdown-it-py            3.0.0
MarkupSafe                2.1.3
matplotlib                3.7.2
matplotlib-inline         0.1.6
mccabe                    0.7.0
mdit-py-plugins           0.4.0
mdurl                     0.1.2
mistune                   3.0.1
mkl                       2021.1.1
mkl-devel                 2021.1.1
mkl-include               2021.1.1
mock                      5.0.2
more-itertools            8.10.0
mpmath                    1.3.0
msgpack                   1.0.5
multidict                 6.0.4
murmurhash                1.0.9
mypy-extensions           1.0.0
nbclient                  0.8.0
nbconvert                 7.6.0
nbformat                  5.9.0
nest-asyncio              1.5.6
networkx                  2.6.3
ninja                     1.11.1
notebook                  6.4.10
numba                     0.57.1+1.gf851d279c
numpy                     1.22.2
nvidia-dali-cuda120       1.27.0
nvidia-pyindex            1.0.9
nvtx                      0.2.5
oauthlib                  3.2.2
ogb                       1.3.6
onnx                      1.14.0
opencv                    4.7.0
optuna                    3.2.0
outdated                  0.2.2
packaging                 23.1
pandas                    1.5.2
pandocfilters             1.5.0
parso                     0.8.3
partd                     1.4.0
pathspec                  0.11.1
pathy                     0.10.2
pexpect                   4.8.0
pickleshare               0.7.5
Pillow                    9.2.0
pip                       23.1.2
platformdirs              3.8.0
pluggy                    1.2.0
ply                       3.11
polygraphy                0.47.1
pooch                     1.7.0
preshed                   3.0.8
prettytable               3.8.0
prometheus-client         0.17.0
prompt-toolkit            3.0.39
protobuf                  3.20.3
psutil                    5.9.4
ptxcompiler               0.8.1+1.gb323413
ptyprocess                0.7.0
pure-eval                 0.2.2
pyarrow                   11.0.0
pyasn1                    0.5.0
pyasn1-modules            0.3.0
pybind11                  2.10.4
pycocotools               2.0+nv0.7.3
pycodestyle               2.10.0
pycparser                 2.21
pydantic                  1.10.11
pyflakes                  3.0.1
pyg-lib                   0.2.0
Pygments                  2.15.1
PyGObject                 3.42.1
PyJWT                     2.3.0
pylibcugraph              23.6.0
pylibcugraphops           23.6.0
pylibraft                 23.6.0
pynvml                    11.4.1
pyparsing                 3.0.9
pytest                    7.4.0
pytest-cov                4.1.0
pytest-flakefinder        1.1.0
pytest-rerunfailures      12.0
pytest-shard              0.1.2
pytest-xdist              3.3.1
python-apt                2.4.0+ubuntu1
python-dateutil           2.8.2
python-hostlist           1.23.0
python-rapidjson          1.10
pytorch-quantization      2.1.2
pytz                      2023.3
PyYAML                    6.0
pyzmq                     25.1.0
raft-dask                 23.6.0
referencing               0.29.1
regex                     2023.6.3
requests                  2.31.0
requests-oauthlib         1.3.1
resampy                   0.4.2
rmm                       23.6.0
rpds-py                   0.8.8
rsa                       4.9
scikit-learn              1.2.0
scipy                     1.11.0
SecretStorage             3.3.1
Send2Trash                1.8.2
setuptools                68.0.0
six                       1.16.0
smart-open                6.3.0
sortedcontainers          2.4.0
soundfile                 0.12.1
soupsieve                 2.4.1
spacy                     3.5.4
spacy-legacy              3.0.12
spacy-loggers             1.0.4
sphinx-glpi-theme         0.3
SQLAlchemy                2.0.18
srsly                     2.4.6
stack-data                0.6.2
sympy                     1.12
tabulate                  0.9.0
tbb                       2021.9.0
tblib                     2.0.0
tensorboard               2.9.0
tensorboard-data-server   0.6.1
tensorboard-plugin-wit    1.8.1
tensorrt                  8.6.1
terminado                 0.17.1
thinc                     8.1.10
threadpoolctl             3.1.0
thriftpy2                 0.4.16
tinycss2                  1.2.1
toml                      0.10.2
tomli                     2.0.1
toolz                     0.12.0
torch                     2.1.0a0+b5021ba
torch_geometric           2.4.0
torch-tensorrt            1.5.0.dev0
torchdata                 0.7.0a0
torchmetrics              1.0.0
torchtext                 0.16.0a0
torchvision               0.16.0a0
tornado                   6.3.2
tqdm                      4.65.0
traitlets                 5.9.0
transformer-engine        0.10.0+96ed6fc
treelite                  3.2.0
treelite-runtime          3.2.0
triton                    2.1.0
tritonclient              2.35.0
typer                     0.9.0
types-dataclasses         0.6.6
typing_extensions         4.7.0
ucx-py                    0.32.0
uff                       0.6.9
unattended-upgrades       0.1
urllib3                   1.26.16
wadllib                   1.3.6
wasabi                    1.1.2
wcwidth                   0.2.6
webencodings              0.5.1
Werkzeug                  2.3.6
wget                      3.2
wheel                     0.40.0
xdoctest                  1.0.2
xgboost                   1.7.5
yarl                      1.9.2
zict                      3.0.0
zipp                      3.15.0
zope.event                5.0
zope.interface            6.0
lydiawunan commented 1 year ago

Please find the list as follows.

conda list
# packages in environment at /home/nanwu/anaconda3/envs/pytorch:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main
_openmp_mutex             5.1                       1_gnu
blas                      1.0                         mkl
brotlipy                  0.7.0           py39h27cfd23_1003
bzip2                     1.0.8                h7b6447c_0
ca-certificates           2022.07.19           h06a4308_0
certifi                   2022.6.15        py39h06a4308_0
cffi                      1.15.1           py39h74dc2b5_0
charset-normalizer        2.0.4              pyhd3eb1b0_0
cryptography              37.0.1           py39h9ce1e76_0
cudatoolkit               11.3.1               h2bc3f7f_2
cycler                    0.11.0                   pypi_0    pypi
ffmpeg                    4.3                  hf484d3e_0    pytorch
fonttools                 4.37.1                   pypi_0    pypi
freetype                  2.11.0               h70c0345_0
giflib                    5.2.1                h7b6447c_0
gmp                       6.2.1                h295c915_3
gnutls                    3.6.15               he1e5248_0
idna                      3.3                pyhd3eb1b0_0
intel-openmp              2021.4.0          h06a4308_3561
jinja2                    3.1.2                    pypi_0    pypi
joblib                    1.1.0                    pypi_0    pypi
jpeg                      9e                   h7f8727e_0
kiwisolver                1.4.4                    pypi_0    pypi
lame                      3.100                h7b6447c_0
lcms2                     2.12                 h3be6417_0
ld_impl_linux-64          2.38                 h1181459_1
lerc                      3.0                  h295c915_0
libdeflate                1.8                  h7f8727e_5
libffi                    3.3                  he6710b0_2
libgcc-ng                 11.2.0               h1234567_1
libgomp                   11.2.0               h1234567_1
libiconv                  1.16                 h7f8727e_2
libidn2                   2.3.2                h7f8727e_0
libpng                    1.6.37               hbc83047_0
libstdcxx-ng              11.2.0               h1234567_1
libtasn1                  4.16.0               h27cfd23_0
libtiff                   4.4.0                hecacb30_0
libunistring              0.9.10               h27cfd23_0
libwebp                   1.2.2                h55f646e_0
libwebp-base              1.2.2                h7f8727e_0
lz4-c                     1.9.3                h295c915_1
markupsafe                2.1.1                    pypi_0    pypi
matplotlib                3.5.3                    pypi_0    pypi
mkl                       2021.4.0           h06a4308_640
mkl-service               2.4.0            py39h7f8727e_0
mkl_fft                   1.3.1            py39hd3c417c_0
mkl_random                1.2.2            py39h51133e4_0
mlxtend                   0.20.0                   pypi_0    pypi
ncurses                   6.3                  h5eee18b_3
nettle                    3.7.3                hbbd107a_1
networkx                  2.8.6                    pypi_0    pypi
numpy                     1.23.1           py39h6c91a56_0
numpy-base                1.23.1           py39ha15fc14_0
nvidia-ml-py3             7.352.0                  pypi_0    pypi
openh264                  2.1.1                h4ff587b_0
openssl                   1.1.1q               h7f8727e_0
packaging                 21.3                     pypi_0    pypi
pandas                    1.4.4                    pypi_0    pypi
pillow                    9.2.0            py39hace64e9_1
pip                       22.1.2           py39h06a4308_0
pycparser                 2.21               pyhd3eb1b0_0
pyg-lib                   0.2.0+pt112cu113          pypi_0    pypi
pyopenssl                 22.0.0             pyhd3eb1b0_0
pyparsing                 3.0.9                    pypi_0    pypi
pysocks                   1.7.1            py39h06a4308_0
python                    3.9.13               haa1d7c7_1
python-dateutil           2.8.2                    pypi_0    pypi
pytorch                   1.12.1          py3.9_cuda11.3_cudnn8.3.2_0    pytorch
pytorch-mutex             1.0                        cuda    pytorch
pytz                      2022.2.1                 pypi_0    pypi
readline                  8.1.2                h7f8727e_1
requests                  2.28.1           py39h06a4308_0
scikit-learn              1.1.2                    pypi_0    pypi
scipy                     1.9.1                    pypi_0    pypi
setuptools                63.4.1           py39h06a4308_0
six                       1.16.0             pyhd3eb1b0_1
sqlite                    3.39.2               h5082296_0
threadpoolctl             3.1.0                    pypi_0    pypi
tk                        8.6.12               h1ccaba5_0
torch-geometric           2.1.0.post1              pypi_0    pypi
torch-scatter             2.0.9                    pypi_0    pypi
torch-sparse              0.6.15                   pypi_0    pypi
torchaudio                0.12.1               py39_cu113    pytorch
torchvision               0.13.1               py39_cu113    pytorch
tqdm                      4.64.1                   pypi_0    pypi
typing_extensions         4.3.0            py39h06a4308_0
tzdata                    2022a                hda174b7_0
urllib3                   1.26.11          py39h06a4308_0
wheel                     0.37.1             pyhd3eb1b0_0
xz                        5.2.5                h7f8727e_1
zlib                      1.2.12               h7f8727e_2
zstd                      1.5.2                ha4553b6_0
puririshi98 commented 1 year ago

@lydiawunan hopefully my recent change should allow your older environment to work. if you'd like to try the new code you can use https://developer.nvidia.com/pyg-container-early-access to get the latest nvidia container in early access

puririshi98 commented 1 year ago

@lydiawunan anything else needed for merging?

lydiawunan commented 1 year ago

Thanks for the follow-up! Just merged the code and updated the readme accordingly.