Hi all,
while learning about the sub-graph extractions. I ran across this error, when testing the file:
Only modification i did was to modify the file path line to ip_folder ="../../examples/data/MUTAG" in the ifname == "main__": part.
Using networkx==1.1, btw.
python weisfeiler_lehman_patterns.py
(base) decomposition(master) ✗: python weisfeiler_lehman_patterns.py
Loaded 188 files in total
Traceback (most recent call last):
File "weisfeiler_lehman_patterns.py", line 295, in
corpus, vocabulary, prob_map, num_graphs, graph_map = wl_corpus(all_files, max_h)
File "weisfeiler_lehman_patterns.py", line 236, in wl_corpus
graphs = [initial_relabel(g, node_label_attr_name) for g in graphs]
File "weisfeiler_lehman_patterns.py", line 236, in
graphs = [initial_relabel(g, node_label_attr_name) for g in graphs]
File "weisfeiler_lehman_patterns.py", line 52, in initial_relabel
for node in graph.nodes(): graph.nodes[node]['relabel'] = {} # make a dictionary attribute
TypeError: 'method' object is not subscriptable
(base) decomposition(master) ✗:
Hi all, while learning about the sub-graph extractions. I ran across this error, when testing the file: Only modification i did was to modify the file path line to ip_folder ="../../examples/data/MUTAG" in the ifname == "main__": part. Using networkx==1.1, btw.
(base) decomposition(master) ✗: python weisfeiler_lehman_patterns.py Loaded 188 files in total
... Loading graphs
100%|███████████████████████████████████████| 188/188 [00:00<00:00, 1617.86it/s]
... Loaded all the graphs
Traceback (most recent call last): File "weisfeiler_lehman_patterns.py", line 295, in
corpus, vocabulary, prob_map, num_graphs, graph_map = wl_corpus(all_files, max_h)
File "weisfeiler_lehman_patterns.py", line 236, in wl_corpus
graphs = [initial_relabel(g, node_label_attr_name) for g in graphs]
File "weisfeiler_lehman_patterns.py", line 236, in
graphs = [initial_relabel(g, node_label_attr_name) for g in graphs]
File "weisfeiler_lehman_patterns.py", line 52, in initial_relabel
for node in graph.nodes(): graph.nodes[node]['relabel'] = {} # make a dictionary attribute
TypeError: 'method' object is not subscriptable
(base) decomposition(master) ✗:
Thank you for writing this awesome package :+1: