-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Gensim And Compatibility
Gensim supports any Python before its end-of-life:
- Old Python releases (not supported): https://devguide.python.org/devcycle/#end-of-life-branches
- Active Python releases (supported): https://devguide.python.org/#branchstatus
Current (supported) Pythons are automatically tested via Gensim's continuous integration (CI) system.
Gensim uses "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
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.
For this reason, each new Gensim release (minor or major, starting with Gensim 4.0) comes with a "model upgrade" script:
python -m gensim.scripts.upgrade_model_4.3_to_4.4 /path/to/old_model.gensim /path/to/new_model.gensim
This will upgrade a model stored with an immediately preceding Gensim version (e.g. 4.3
) to the current version (e.g. 4.4
), and store it under a new filename.
If you have a model serialized several versions back (e.g. 4.1
), you'll have to upgrade in multiple hops: 4.1 => 4.2 => 4.3 => 4.4. Or re-train your model from scratch in the latest.