DiffDock
DiffDock copied to clipboard
error running inference: object has no attribute sparse_csc_tensor
After successfully installing all the packages in the conda environment, I tried running inference as suggested in the Github page with the given example data in the repo. However, I receive this runtimerror even though all packages recquired by pytorch have been installed (including torch-sparse). Any ideas on what the problem might be?
RuntimeError:
object has no attribute sparse_csc_tensor:
File "/home/anicoli/anaconda3/envs/diffdock/lib/python3.9/site-packages/torch_sparse/tensor.py", line 520
value = torch.ones(self.nnz(), dtype=dtype, device=self.device())
return torch.sparse_csc_tensor(colptr, row, value, self.sizes())
~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
I had the same error as you. And I solved the error by downlgrading the torch-sparse's vertion to 0.6.14. You could have a try:)
I replaced the complete line with the following. Using 0.6.14 produced a different error for me but I had success with 0.6.15.
pip install torch-scatter==2.1.1 torch-sparse==0.6.15 torch-cluster==1.6.0 torch-spline-conv torch-geometric==2.0.4 -f https://data.pyg.org/whl/torch-1.11.0+cu117.html
I replaced the complete line with the following. Using 0.6.14 produced a different error for me but I had success with 0.6.15.
pip install torch-scatter==2.1.1 torch-sparse==0.6.15 torch-cluster==1.6.0 torch-spline-conv torch-geometric==2.0.4 -f https://data.pyg.org/whl/torch-1.11.0+cu117.html
This works perfectly for me! The authors should update their pip install instructions to be more specific and include version details