How to fix RuntimeError: Bool type is not supported by dlpack

Viewed 1955

I have been using the following code to get the default Cora dataset provided by DGL, but the following error suddenly occurred today.

The code was runned in CoLab (python 3.7 and Pytorch backend). I believed this is a error from the DGL update (since it had worked all the time before). However, I just wonder if there is anything we can do on our end to fix this?

Thanks.

enter image description here

2 Answers

It seems that an error is from torch update to 1.10.0. Reinstalling torch to 1.9.1 works for me. You can reinstall torch in colab as follows:

!pip install dgl==0.6.1
!pip install torch==1.9.1
import dgl
cora = dgl.data.CoraGraphDataset()

installing the last GPU accelerated(cuda 11.1) dgl with pip install dgl-cu111 -f https://data.dgl.ai/wheels/repo.html

Related