Skip to content

Gensim And Compatibility

Radim Řehůřek edited this page Mar 5, 2021 · 15 revisions

Upgrading Python

Gensim supports any Python that's before its end-of-life:

Current (supported) Pythons are automatically tested via Gensim's continuous integration (CI) system.

Upgrading Gensim

Gensim follows "semantic versioning": major.minor.bugfix, though not fanatically. Always read the release notes carefully!

To upgrade to the latest release, simply run

pip install --upgrade gensim

Upgrading trained models

Users store Gensim models using Gensim's native .save() and .load() methods.

After you upgrade Gensim, your serialized model may be out-of-date: the new Gensim release may have added/removed some attributes, or made other changes.

To cut down maintenance effort, Gensim only guarantees (and automatically tests) compatibility between successive major releases. That is, a model stored in Gensim 4.X is guaranteed to load in 4.(X+1).

Loading older models may work too, but Gensim is a volunteering open source project and we cannot promise anything more.

Your other option is to re-train your model from scratch with each upgrade. This may offer additional benefits, because new versions of Gensim may have improved accuracy, fixed bugs etc.

Clone this wiki locally