I have a DGLGraph obeject g, which comes from:
g = DglNodePropPredDataset(name='ogbn-mag')[0]
and print g
:
Graph(num_nodes={'author': 1134649, 'field_of_study': 59965, 'institution': 8740, 'paper': 736389},
num_edges={('author', 'affiliated_with', 'institution'): 1043998, ('author', 'writes', 'paper'): 7145660, ('paper', 'cites', 'paper'): 5416271, ('paper', 'has_topic', 'field_of_study'): 7505078},
metagraph=[('author', 'institution', 'affiliated_with'), ('author', 'paper', 'writes'), ('paper', 'paper', 'cites'), ('paper', 'field_of_study', 'has_topic')]), {'paper': tensor([[246],
[131],
[189],
...,
[266],
[289],
[ 1]])})
the result shows that g
is a Graph object indeed. But when I call g.adj_external(etype='writes')
, it raises AttributeError.
My dgl version is 1.0.0+cu113.