snap-stanford / deepsnap

Python library assists deep learning on graphs
https://snap.stanford.edu/deepsnap/
MIT License
546 stars 56 forks source link

AttributeError: 'HeteroGraph' object has no attribute 'node_to_tensor_mapping' #19

Closed qoffee closed 3 years ago

qoffee commented 3 years ago

hello, when i call: hete = HeteroGraph(G_orig) i get an answer AttributeError: 'HeteroGraph' object has no attribute 'node_to_tensor_mapping'

the graph is very simple - two types of vertices

XinweiHe commented 3 years ago

you could checkout the unit test file in tests folder: test_hetero_graph.py, where there are multiple case where G = generate_simple_hete_graph() hete = HeteroGraph(G) are called successfully. generate_simple_hete_graph function is defined in utils.py in tests folder, you could compared its implementation and yours and see where causes the different result (i.e. bug-free vs bug).

If you still have trouble after inspection, you could consider provide more detailed information of how G_orig is defined, I would be willing to help.