Code Monkey home page Code Monkey logo

pigvae's People

Contributors

andrinr avatar jrwnter 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

Watchers

 avatar  avatar  avatar

pigvae's Issues

Experimental setups for chemical datasets

Hi,

Thank you for sharing your great work. I'd like to replicate experimental results on QM9 and PubChem in your paper, which seems to be missing in this repository. It would be appreciate to update corresponding implementations.

Thanks in advance!

RuntimeError

Hi!Thank you for the code.But I encounter the following error when I try to run the main.py:
RuntimeError: The 'data' object was created by an older version of PyG. If this error occurred while loading an already existing dataset, remove the 'processed/' directory in the dataset's root folder and try again.
I have already install the packages as you specified in the readme. and my pyg version is torch1.7.0+cu110.Could you give me a hand?Thank you very much!
Here are all the packages(by conda list):
_libgcc_mutex 0.1 main https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
_openmp_mutex 5.1 1_gnu https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
absl-py 1.2.0 pyhd8ed1ab_0 conda-forge
aiohttp 3.7.0 py38h1e0a361_0 conda-forge
async-timeout 3.0.1 py_1000 conda-forge
attrs 22.1.0 pyh71513ae_1 conda-forge
blas 1.0 mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
blinker 1.4 py_1 conda-forge
boost 1.74.0 py38h2b96118_5 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
boost-cpp 1.74.0 h9359b55_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
bottleneck 1.3.5 py38h7deecbd_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
brotli 1.0.9 h5eee18b_7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
brotli-bin 1.0.9 h5eee18b_7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
brotlipy 0.7.0 py38h0a891b7_1004 conda-forge
bzip2 1.0.8 h7b6447c_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
c-ares 1.18.1 h7f98852_0 conda-forge
ca-certificates 2022.07.19 h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cachetools 5.2.0 pyhd8ed1ab_0 conda-forge
cairo 1.16.0 h3fc0475_1005 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
certifi 2022.6.15 py38h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cffi 1.14.4 py38ha312104_0 conda-forge
chardet 3.0.4 py38h924ce5b_1008 conda-forge
charset-normalizer 2.1.0 pyhd8ed1ab_0 conda-forge
click 8.1.3 py38h578d9bd_0 conda-forge
colorama 0.4.5 pyhd8ed1ab_0 conda-forge
cryptography 37.0.2 py38h2b5fc30_0 conda-forge
cudatoolkit 11.0.221 h6bb024c_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cycler 0.11.0 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
expat 2.4.8 h27087fc_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
fontconfig 2.14.0 h8e229c2_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
fonttools 4.25.0 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
freetype 2.11.0 h70c0345_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
fsspec 2022.7.1 pyhd8ed1ab_0 conda-forge
future 0.18.2 py38h578d9bd_5 conda-forge
gettext 0.21.0 hf68c758_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
giflib 5.2.1 h7b6447c_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
glib 2.58.3 py38h73cb85d_1004 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
google-auth 2.10.0 pyh6c4a22f_0 conda-forge
google-auth-oauthlib 0.4.6 pyhd8ed1ab_0 conda-forge
greenlet 1.1.1 py38h295c915_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
grpcio 1.38.1 py38hdd6454d_0 conda-forge
icu 67.1 he1b5a44_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
idna 3.3 pyhd8ed1ab_0 conda-forge
importlib-metadata 4.11.4 py38h578d9bd_0 conda-forge
intel-openmp 2021.4.0 h06a4308_3561 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
jinja2 3.1.2 pypi_0 pypi
joblib 1.1.0 pypi_0 pypi
jpeg 9b h024ee3a_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
kiwisolver 1.4.2 py38h295c915_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
lcms2 2.12 h3be6417_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libbrotlicommon 1.0.9 h5eee18b_7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libbrotlidec 1.0.9 h5eee18b_7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libbrotlienc 1.0.9 h5eee18b_7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libedit 3.1.20210910 h7f8727e_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libffi 3.2.1 hf484d3e_1007 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libgcc-ng 11.2.0 h1234567_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libgomp 11.2.0 h1234567_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libiconv 1.16 h7f8727e_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libpng 1.6.37 hbc83047_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libprotobuf 3.18.0 h780b84a_1 conda-forge
libstdcxx-ng 11.2.0 h1234567_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libtiff 4.1.0 h2733197_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libuuid 2.32.1 h7f98852_1000 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libuv 1.40.0 h7b6447c_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libwebp 1.2.0 h89dd481_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libxcb 1.15 h7f8727e_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libxml2 2.9.10 h68273f3_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
lz4-c 1.9.3 h295c915_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
markdown 3.4.1 pyhd8ed1ab_0 conda-forge
markupsafe 2.1.1 py38h0a891b7_1 conda-forge
matplotlib-base 3.5.1 py38ha18d171_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl 2021.4.0 h06a4308_640 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl-service 2.4.0 py38h7f8727e_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl_fft 1.3.1 py38hd3c417c_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl_random 1.2.2 py38h51133e4_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
multidict 6.0.2 py38h0a891b7_1 conda-forge
munkres 1.1.4 py_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ncurses 6.3 h5eee18b_3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
networkx 2.8.4 py38h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ninja 1.10.2 h06a4308_5 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ninja-base 1.10.2 hd09550d_5 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
numexpr 2.8.3 py38h807cd23_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
numpy 1.23.1 py38h6c91a56_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
numpy-base 1.23.1 py38ha15fc14_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
oauthlib 3.2.0 pyhd8ed1ab_0 conda-forge
openssl 1.1.1q h7f8727e_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
packaging 21.3 pyhd8ed1ab_0 conda-forge
pandas 1.4.3 pypi_0 pypi
pcre 8.45 h295c915_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pillow 9.2.0 py38hace64e9_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pip 22.1.2 py38h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pixman 0.38.0 h516909a_1003 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
protobuf 3.18.0 py38h709712a_0 conda-forge
pyasn1 0.4.8 py_0 conda-forge
pyasn1-modules 0.2.7 py_0 conda-forge
pycairo 1.21.0 py38h287db57_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pydeprecate 0.3.0 pyhd8ed1ab_0 conda-forge
pyjwt 2.4.0 pyhd8ed1ab_0 conda-forge
pyopenssl 22.0.0 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 py38h578d9bd_5 conda-forge
python 3.8.0 h0371630_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python-dateutil 2.8.2 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python_abi 3.8 2_cp38 conda-forge
pytorch 1.7.0 py3.8_cuda11.0.221_cudnn8.0.3_0 pytorch
pytorch-lightning 1.3.1 pyhd8ed1ab_0 conda-forge
pytz 2022.2.1 pypi_0 pypi
pyu2f 0.1.5 pyhd8ed1ab_0 conda-forge
pyyaml 5.4.1 py38h497a2fe_1 conda-forge
rdkit 2022.03.2 py38ha829ea6_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
readline 7.0 h7b6447c_5 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
reportlab 3.5.67 py38hfdd840d_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
requests 2.28.1 pyhd8ed1ab_0 conda-forge
requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge
rsa 4.9 pyhd8ed1ab_0 conda-forge
scikit-learn 1.1.2 pypi_0 pypi
scipy 1.9.0 pypi_0 pypi
setuptools 61.2.0 py38h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
six 1.16.0 pyhd3eb1b0_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
sqlalchemy 1.4.39 py38h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
sqlite 3.33.0 h62c20be_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tensorboard 2.10.0 pyhd8ed1ab_0 conda-forge
tensorboard-data-server 0.6.0 py38h2b5fc30_2 conda-forge
tensorboard-plugin-wit 1.8.1 pyhd8ed1ab_0 conda-forge
threadpoolctl 3.1.0 pypi_0 pypi
tk 8.6.12 h1ccaba5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
torch-cluster 1.5.9 pypi_0 pypi
torch-geometric 2.0.4 pypi_0 pypi
torch-scatter 2.0.7 pypi_0 pypi
torch-sparse 0.6.9 pypi_0 pypi
torch-spline-conv 1.2.1 pypi_0 pypi
torchaudio 0.7.0 py38 pytorch
torchmetrics 0.5.1 pyhd8ed1ab_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
torchvision 0.8.0 py38_cu110 pytorch
tqdm 4.64.0 pyhd8ed1ab_0 conda-forge
typing_extensions 4.3.0 py38h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
urllib3 1.26.11 pyhd8ed1ab_0 conda-forge
werkzeug 2.2.2 pyhd8ed1ab_0 conda-forge
wheel 0.37.1 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
xorg-kbproto 1.0.7 h7f98852_1002 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xorg-libice 1.0.10 h7f98852_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xorg-libsm 1.2.3 hd9c2040_1000 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xorg-libx11 1.7.2 h7f98852_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xorg-libxext 1.3.4 h7f98852_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xorg-libxrender 0.9.10 h7f98852_1003 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xorg-renderproto 0.11.1 h7f98852_1002 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xorg-xextproto 7.3.0 h7f98852_1002 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xorg-xproto 7.0.31 h27cfd23_1007 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
xz 5.2.5 h7f8727e_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.7.2 py38h0a891b7_2 conda-forge
zipp 3.8.1 pyhd8ed1ab_0 conda-forge
zlib 1.2.12 h7f8727e_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
zstd 1.4.9 haebb681_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

Two possible bugs in synthetic dataset code

Hi, I was trying to reproduce the synthetic graph experiments and I found what look like two bugs - both in data.py:
https://github.com/jrwnter/pigvae/blob/c3dfcef252f2bf7d34ee4c8dca2ca5a605fa894b/pigvae/synthetic_graphs/data.py#L159C13-L169
When dm is converted to .long() on line 164, it seems like infinite entries in dm (indicating two unconnected nodes) turn into very large negative numbers. This causes the subsequent clamping to turn them into zeros. The result is that both unconnected nodes and self-connections are coded as the first entry in the one-hot vectors. I don't know how big of a problem this is, but it's relatively straightforward to fix by moving the conversion to 'long' after the clamping:

dm = torch.from_numpy(floyd_warshall_numpy(graph))
dm = torch.clamp(dm, 0, 5).unsqueeze(-1).long()

Another issue is that after num_nodes is reassigned on line 166, it always corresponds to the maximum number of nodes. This results in the mask always containing True exclusively. This is also straightforward to fix like this (i.e. without reassigning num_nodes):

dm = torch.zeros((max_num_nodes, max_num_nodes, 6)).type_as(dm).scatter_(2, dm, 1).float()
edge_features.append(dm)
mask.append((torch.arange(max_num_nodes) < num_nodes).unsqueeze(0))

Please let me know if I misunderstood something and these are not actually bugs!

Module not found error

ddp.py line: 3
There is no LightningDistributedDataParallel in pytorch_lightning.overrides.data_parallel.

Embedding node type

Hi,

In the GraphEncoder.add_emb_node_and_feature,
edge_features[:, 0, :, edge_dim] = 1
edge_features[:, :, 0, edge_dim] = 1
I believe these two lines are trying to give the embedding edge a new type right? Why we don't have a similar code for embedding node type like:
node_features[:,0,node_dim] = 1

Thanks,
Yurui

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.