Skip to content

Commit

Permalink
Fix bug that prevents loading old models (#3359)
Browse files Browse the repository at this point in the history
* fix loading old gensim model by new model

* Revert "fix loading old gensim model by new model"

This reverts commit d398e92.

* fix loading old gensim model by new model

* Update word2vec.py

* Update word2vec.py

* Update word2vec.py

Co-authored-by: Michael Penkov <m@penkov.dev>
  • Loading branch information
funasshi and mpenkov authored Dec 7, 2022
1 parent 68fdbf9 commit e656d77
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gensim/models/word2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@
from gensim.models.keyedvectors import KeyedVectors, pseudorandom_weak_vector
from gensim import utils, matutils

# This import is required by pickle to load models stored by Gensim < 4.0, such as Gensim 3.8.3.
from gensim.models.keyedvectors import Vocab # noqa

from smart_open.compression import get_supported_extensions

logger = logging.getLogger(__name__)
Expand Down

0 comments on commit e656d77

Please sign in to comment.