DiffDock icon indicating copy to clipboard operation
DiffDock copied to clipboard

error running inference: object has no attribute sparse_csc_tensor

Open mlorenz49 opened this issue 1 year ago • 3 comments

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

mlorenz49 avatar Aug 08 '23 16:08 mlorenz49

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:)

MsCongs avatar Aug 23 '23 13:08 MsCongs

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

mrjoness avatar Sep 06 '23 16:09 mrjoness

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

frank-stonybrook avatar Oct 02 '23 19:10 frank-stonybrook