gensimがいつのまにかバージョン3.4.0になってた
pythonのword2vec, doc2vecのライブラリであるgensimのバージョンが上がってた。
今年の2月終わりぐらいまで使ってて、さっき使おうとしたらエラー吐かれた...
AttributeError: 'DocvecsArray' object has no attribute 'vector_size'
pipでライブラリ全upgradeした時に更新されてしまったんですね。
githubのissue見てみると
とのことなので、バージョン間の互換性はなさそう(2と3はわからない...)
まあ、上記のエラーが出るということは2と3のもないんですかね。
とりあえず
pip uninstall gensim
pip install gensim==2.3.0
で、以前まで使っていたgensimの2.3.0版をダウンロードして解決しました。
I encountered the same error. I trained my model with gensim version 1.0.1 and I'm trying to reload it with gensim version 3.4.0. Unfortunately, I cannot share my model.
that's expected behavior, we don't have so long backward compatibility for models.