My envs:
dgl-cu113 0.7.1
ogb 1.3.6
My codes
import dgl
# Load Node Property Prediction datasets in OGB
from ogb.nodeproppred import DglNodePropPredDataset
dataset = DglNodePropPredDataset(name='ogbn-proteins')
split_idx = dataset.get_idx_split()
# there is only one graph in Node Property Prediction datasets
g, labels = dataset[0]
# get split labels
train_label = dataset.labels[split_idx['train']]
valid_label = dataset.labels[split_idx['valid']]
test_label = dataset.labels[split_idx['test']]
But failed
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/opt/conda/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/conda/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/conda/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/conda/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/opt/conda/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/opt/conda/lib/python3.8/http/client.py", line 922, in connect
self.sock = self._create_connection(
File "/opt/conda/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/opt/conda/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 28, in <module>
dataset = DglNodePropPredDataset(name='ogbn-proteins')
File "/opt/conda/lib/python3.8/site-packages/ogb/nodeproppred/dataset_dgl.py", line 69, in __init__
self.pre_process()
File "/opt/conda/lib/python3.8/site-packages/ogb/nodeproppred/dataset_dgl.py", line 98, in pre_process
if decide_download(url):
File "/opt/conda/lib/python3.8/site-packages/ogb/utils/url.py", line 12, in decide_download
d = ur.urlopen(url)
File "/opt/conda/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/opt/conda/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/opt/conda/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/opt/conda/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/opt/conda/lib/python3.8/urllib/request.py", line 1383, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/opt/conda/lib/python3.8/urllib/request.py", line 1357, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>