Hi, I am a complete newby to dgl library. I started following the tutorials did the one below finally.
https://docs.dgl.ai/guide/graph-graphs-nodes-edges.html
But bg = dgl.to_bidirected(g) line throws the following error.
DGLError Traceback (most recent call last)
<ipython-input-29-01a6bfd86165> in <module>()
----> 1 g = dgl.graph(g)
2
3 bg = dgl.to_bidirected(g)
4
5 bg.edges()
/home/halil/anaconda3/envs/dgl/lib/python3.5/site-packages/dgl/convert.py in graph(data, ntype, etype, num_nodes, card, validate, restrict_format, **kwargs)
147 data, ntype, etype, restrict_format=restrict_format, **kwargs)
148 else:
--> 149 raise DGLError('Unsupported graph data type:', type(data))
150
151 def bipartite(data, utype='_U', etype='_E', vtype='_V', num_nodes=None, card=None,
DGLError: ('Unsupported graph data type:', <class 'dgl.heterograph.DGLHeteroGraph'>)
I checked and dgl.graph() function really returns an hetero graph and as far as I understand it should return a regular graph. What is causing this error and what is the solution.
Edit: I just realized that my to_bidirected() method’s implementation is different than the one in the docs. Is there an inconsistency or am I not getting the latest version somehow?