Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

propagate() got an unexpected keyword argument 'distance' #82

Open
Dengsongquanch opened this issue Nov 8, 2024 · 3 comments
Open

propagate() got an unexpected keyword argument 'distance' #82

Dengsongquanch opened this issue Nov 8, 2024 · 3 comments

Comments

@Dengsongquanch
Copy link

When I run the run.sh in 3_train in example, there occurs the error below:
Traceback (most recent call last):
File "/public/home/yika/miniforge3/envs/deepH3/bin/deeph-train", line 8, in
sys.exit(main())
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/deeph/scripts/train.py", line 20, in main
kernel.train(train_loader, val_loader, test_loader)
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/deeph/kernel.py", line 513, in train
train_losses = self.kernel_fn(train_loader, 'TRAIN')
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/deeph/kernel.py", line 658, in kernel_fn
output = self.model(
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/deeph/model.py", line 633, in forward
atom_fea, edge_fea = self.mp1(atom_fea0, edge_idx, edge_fea0, batch, distance, edge_vec)
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/deeph/model.py", line 406, in forward
atom_fea = self.cgconv(atom_fea, edge_idx, edge_fea, batch, distance)
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/public/home/yika/miniforge3/envs/deepH3/lib/python3.9/site-packages/deeph/model.py", line 145, in forward
out = self.propagate(edge_index, x=x, edge_attr=edge_attr, distance=distance, size=size)
TypeError: propagate() got an unexpected keyword argument 'distance'

the version of my pyg is 2.6.1,should I make it lower than 2.6.1?

@mzjb
Copy link
Owner

mzjb commented Nov 8, 2024

Please consider using the package versions specified in the README (https://github.com/mzjb/DeepH-pack?tab=readme-ov-file#python).

@Dengsongquanch
Copy link
Author

Please consider using the package versions specified in the README (https://github.com/mzjb/DeepH-pack?tab=readme-ov-file#python).

thank you. However, on our computer cluster, cuda is version 11.8, and pytorch1.9.1 can only find cuda11.1. Can a higher version of cuda be compatible with a lower version of pytorch?

@mzjb
Copy link
Owner

mzjb commented Nov 8, 2024

Yes, a higher system CUDA version (like 11.8) can be compatible with a lower version of PyTorch (like 1.9.1 with CUDA 11.1), as PyTorch typically uses its own built-in CUDA libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants