GLN icon indicating copy to clipboard operation
GLN copied to clipboard

pytorch_geometric issue

Open fregocap opened this issue 4 years ago • 4 comments

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

fregocap avatar Apr 23 '20 23:04 fregocap

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,

Hanjun-Dai avatar Apr 26 '20 05:04 Hanjun-Dai

Thanks, it worked, but I still had to change scatter_max as you are using an old version of torch_scatter.

fregocap avatar Apr 30 '20 14:04 fregocap

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 .

kymckay avatar Aug 04 '22 12:08 kymckay

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 .

Thanks a lot!

hhhhzzzzz avatar Aug 15 '22 05:08 hhhhzzzzz