GLN
GLN copied to clipboard
pytorch_geometric issue
Hi,
Right now, in order to install pytorch_geometric you need to have pytorch 1.4.0 installed. However, you have only tested your code until an older version (1.3). Since, we need pytorch_geometric installed to run your code, it becomes a bit complicated for me.
Error that is produced
File "/home/newuser/anaconda3/envs/my-env/lib/python3.6/site-packages/torch_geometric/nn/conv/message_passing.py", line 243, in propagate
assert isinstance(size, list)
AssertionError
Hi there,
I've pushed a hot fix that should be able to resolve the above issue and let you run the code.
However I didn't test under the new torch version, so there's no guarantee for the results/performance with the new version. You may still want to play with the code by creating a virtual env.
Best,
Thanks, it worked, but I still had to change scatter_max as you are using an old version of torch_scatter.
For any future readers, to get training working:
I had to install PyTorch 1.11.0 to then be able to install pyg (via pip wheels) in order to resolve this. You can then remove the 6th argument passed to the orig_smax
and orig_smin
calls in gln/mods/mol_gnn/gnn_family/utils.py
to work with the newer dependencies.
So the environment setup (with activate directory in GLN
) is:
conda create -n gln-env pytorch=1.11.0 -c pytorch -y
conda activate gln-env
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.11.0+cu113.html
pip install torch-sparse -f https://data.pyg.org/whl/torch-1.11.0+cu113.html
pip install torch-geometric
conda install rdkit -c conda-forge -y
pip install -e .
For any future readers, to get training working:
I had to install PyTorch 1.11.0 to then be able to install pyg (via pip wheels) in order to resolve this. You can then remove the 6th argument passed to the
orig_smax
andorig_smin
calls ingln/mods/mol_gnn/gnn_family/utils.py
to work with the newer dependencies.So the environment setup (with activate directory in
GLN
) is:conda create -n gln-env pytorch=1.11.0 -c pytorch -y conda activate gln-env pip install torch-scatter -f https://data.pyg.org/whl/torch-1.11.0+cu113.html pip install torch-sparse -f https://data.pyg.org/whl/torch-1.11.0+cu113.html pip install torch-geometric conda install rdkit -c conda-forge -y pip install -e .
Thanks a lot!