I am using Python 3.7 and I installed dependencies, defined in requirements.txt.
I got following error, when launching the training with bash train.sh.
File "train.py", line 114, in <module>
main()
File "train.py", line 87, in main
word_sense_induction(neighbours_fpath, clusters_fpath, args.n, args.threads)
File "train.py", line 19, in word_sense_induction
ego_network_clustering(neighbours_fpath, clusters_fpath, max_related=n, num_cores=threads)
File "/e/datasets/disambiguation/sensegram/word_sense_induction.py", line 82, in ego_network_clustering
["{}:{:.4f}".format(n,w) for w, n in sorted([(ego_network.node[c_node]["weight"]/WEIGHT_COEF, c_node) for c_node in cluster], reverse=True)]
File "/e/datasets/disambiguation/sensegram/word_sense_induction.py", line 82, in <listcomp>
["{}:{:.4f}".format(n,w) for w, n in sorted([(ego_network.node[c_node]["weight"]/WEIGHT_COEF, c_node) for c_node in cluster], reverse=True)]
AttributeError: 'Graph' object has no attribute 'node'
It turns out that there is a newer version of NetworkX in chinese_whispers package. Now Graph.node is renamed to Graph.nodes.
Once I added that extra s, the training works as expected.
I am using Python 3.7 and I installed dependencies, defined in
requirements.txt
.I got following error, when launching the training with
bash train.sh
.It turns out that there is a newer version of NetworkX in chinese_whispers package. Now
Graph.node
is renamed toGraph.nodes
.Once I added that extra
s
, the training works as expected.