tNodeEmbed
tNodeEmbed copied to clipboard
networkx.exception.NetworkXError: Invalid edge_attr argument: No columns found with name: []
This is what happened when I cloned the repo and ran the test program:
/content/tNodeEmbed/src# python main.py
Traceback (most recent call last):
File "main.py", line 47, in <module>
run(**params)
File "main.py", line 17, in run
tnodeembed = models.tNodeEmbed(graph_nx, task=task, dump_folder=dump_folder, test_size=test_size, **kwargs['n2vargs'])
File "/content/tNodeEmbed/src/models/tNodeEmbed.py", line 42, in __init__
self.pivot_time = self.calculate_pivot_time()
File "/content/tNodeEmbed/src/models/tNodeEmbed.py", line 135, in calculate_pivot_time
pivot_time = get_pivot_time(self.graph_nx, self.test_size)
File "/content/tNodeEmbed/src/utils/graph_utils.py", line 158, in get_pivot_time
test_graph_nx = get_graph_T(graph_nx, min_time=time)
File "/content/tNodeEmbed/src/utils/graph_utils.py", line 97, in get_graph_T
sub_graph_nx = nx.from_pandas_edgelist(graph_df, 'from', 'to', list(attr_keys), create_using=type(graph_nx)())
File "/usr/local/lib/python3.8/dist-packages/networkx/convert_matrix.py", line 443, in from_pandas_edgelist
raise nx.NetworkXError(
networkx.exception.NetworkXError: Invalid edge_attr argument: No columns found with name: []
Here are the relevant package versions:
keras==2.9.0
networkx==2.8.8
node2vec==0.4.6
numpy==1.24.1
pandas==1.3.5
scikit_learn==1.2.1
scipy==1.10.0
tqdm==4.64.1
This will be fixed by pull request https://github.com/urielsinger/tNodeEmbed/pull/14#issue-1557988081