phanein / deepwalk

DeepWalk - Deep Learning for Graphs
http://www.perozzi.net/projects/deepwalk/
Other
2.67k stars 828 forks source link

removal of vestigial gensim import #127

Closed mgudorf closed 2 years ago

mgudorf commented 3 years ago

deepwalk.skipgram imports but does not use an object from gensim, Vocab , which has been removed in gensim>=4.0.0. It wasn't being used anyway so this doesn't affect anything; other than allowing deepwalk to be ran in command line once more. Technically, I only ran deepwalk --help because I just recently cloned the repo, so there could be other gensim compatibility issues elsewhere as well.

GTmac commented 3 years ago

Thanks for working on this! Running deepwalk --help doesn't trigger the training of DeepWalk model. Could you run DeepWalk on some graph (you could refer to the commands in README), and ensure it still works? Thank you!

mgudorf commented 3 years ago

Word2Vec also had a keyword argument change, namely, size was changed to vector_size; the most recent commit accounts for this; I ran the command line with default arguments in the edgelist format; unsure if there are differences in dependencies for different formats. If there's anything else you would like me to check out let me know! @GTmac

$ deepwalk --format edgelist --input edgelist.txt --output deepdish.txt
Number of nodes: 115
Number of walks: 1150
Data size (walks*length): 46000
Walking...
Training...
mgudorf commented 3 years ago

This is linked to issues #125 and #123 (the latter being closed)