Error when following dgl library tutorial "CSVDataset"

I’m quite new to the library dgl so I was following tutorial on how to use their class dgl.data.CSVDataset() for reading your own datasets. My example -graph classification section chapter and I’m even using the same data for this example that was mentioned in docs.

After creating the same folder schema with the same .csv files and the same data, after running dgl.data.CSVDataset(), receiving the error in edges.csv:

KeyError: '0,0,1,"0.3219496197945605,0.3439899477636117,0.7051530741717352"'

Details of the error logs show the following:

DGLError(f"Duplicate edge type[{e_data.type}] for same graph[{graph_id}], please place the same edge_type for same graph into single EdgeData.")

And that is quite strange due to the fact that I’m using the same data from example and this graph obviously should be able to handle self-loops/reversed edges. Sorry if I’m asking something trivial, spent already couple of hours trying to find the reason of this in web but without success. Any suggestions to solve it will be really appreciated! Thanks.

Hi @ds-muzalevskiy ,

What is the data you used? I just followed the tutorial and it worked well. From the error, I suspect you have defined two edges with the same type in meta.yaml.

Best,
Zhenkun

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.