churchmanlab / genewalk

GeneWalk identifies relevant gene functions for a biological context using network representation learning
https://churchman.med.harvard.edu/genewalk
BSD 2-Clause "Simplified" License
128 stars 15 forks source link

Error when calling word2vec: unexpected keyword argument 'size' #46

Closed ri23 closed 3 years ago

ri23 commented 3 years ago

GeneWalk needs updating because of GenSim 4.0.0 release

For users running into the following error: File "/lib64/python3.6/site-packages/genewalk/deepwalk.py", line 138, in word2vec sample=sample) TypeError: __init__() got an unexpected keyword argument 'size'

Immediate fix: downgrade gensim to previous version before running genewalk: pip install --upgrade gensim==3.8.3

Long term solution that I will implement very soon: make GeneWalk compatible with gensim 4.0.0.

More info on the Gensim migration: https://github.com/RaRe-Technologies/gensim/wiki/Migrating-from-Gensim-3.x-to-4 in Word2Vec: size ctr parameter is now consistently vector_size

bgyori commented 3 years ago

Temporarily we can set gensim==3.8.3 in setup.py (and potentially make a minor release) to solve this issue.

ri23 commented 3 years ago

Sounds good, I will try to get to the temp fix you propose / minor release today.