You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I tried to convert this cipdata PyG heterograph into DeepSnap's heterograph
from deepsnap.hetero_graph import HeteroGraph
graph = HeteroGraph(cipdata)
Then I get this error
graph = HeteroGraph(cipdata)
Traceback (most recent call last):
File "/home/hojun/anaconda3/envs/geometric/lib/python3.6/site-packages/torch_geometric/data/storage.py", line 48, in __getattr__
return self[key]
File "/home/hojun/anaconda3/envs/geometric/lib/python3.6/site-packages/torch_geometric/data/storage.py", line 68, in __getitem__
return self._mapping[key]
KeyError: 'number_of_nodes'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<ipython-input-147-5bdfc5ffc776>", line 1, in <module>
graph = HeteroGraph(cipdata)
File "/home/hojun/anaconda3/envs/geometric/lib/python3.6/site-packages/deepsnap/hetero_graph.py", line 94, in __init__
self._update_tensors(init=True)
File "/home/hojun/anaconda3/envs/geometric/lib/python3.6/site-packages/deepsnap/graph.py", line 515, in _update_tensors
self._update_attributes()
File "/home/hojun/anaconda3/envs/geometric/lib/python3.6/site-packages/deepsnap/graph.py", line 531, in _update_attributes
if self.G.number_of_nodes() == 0:
File "/home/hojun/anaconda3/envs/geometric/lib/python3.6/site-packages/torch_geometric/data/hetero_data.py", line 118, in __getattr__
return getattr(self._global_store, key)
File "/home/hojun/anaconda3/envs/geometric/lib/python3.6/site-packages/torch_geometric/data/storage.py", line 51, in __getattr__
f"'{self.__class__.__name__}' object has no attribute '{key}'")
AttributeError: 'BaseStorage' object has no attribute 'number_of_nodes'
How do I easily convert pyg heterograph to deepsnap one?
I wish some detailed example code can be provided.
The text was updated successfully, but these errors were encountered:
I made a PyG heterograph as below.
Then I tried to convert this cipdata PyG heterograph into DeepSnap's heterograph
Then I get this error
How do I easily convert pyg heterograph to deepsnap one?
I wish some detailed example code can be provided.
The text was updated successfully, but these errors were encountered: