Closed diamondspark closed 2 years ago
@a-r-j Any pointers to this?
Hi @diamondspark, apologies, will check this out by the end of the week. Looks like a bug to me. @kexinhuang12345 do you have bandwidth?
Sure, I will take a look
Hi, it seems like you are using pytorch geometric converter from networkx. Please use the graphein converter to get the PyG object:
from graphein.ml.conversion import GraphFormatConvertor
format_convertor = GraphFormatConvertor('nx', 'pyg',
verbose = 'gnn',
columns = None)
data = format_convertor(g)
Thanks, @kexinhuang12345 ! @diamondspark , can you kindly confirm if you're all good on this front so I can close the issue.
Thank you for this excellent work. I am trying to convert the graphs out of the high-level API
g = construct_graph(config=config, pdb_code="3eiy")
I try to convert g further to pyG but get an error
from torch_geometric.utils import from_networkx
data = from_networkx(g)
Error: ~/anaconda3/envs/graphein_dev/lib/python3.8/site-packages/torch_geometric/utils/convert.py in from_networkx(G, group_node_attrs, group_edge_attrs) 162 for key, value in data.items(): 163 try: --> 164 data[key] = torch.tensor(value) 165 except ValueError: 166 pass
RuntimeError: Could not infer dtype of set