Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix verify gensim and numpy installation version check #187

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mahdi-vajdi
Copy link

@mahdi-vajdi mahdi-vajdi commented Feb 8, 2025

Pull Request

Description

Changes

  • Fix version check for numpy dependeny greater than 1.24

Related Issues

Checklist

  • I have read and followed the project's contributing guidelines.
  • My code follows the project's coding style.
  • I have tested my changes thoroughly.
  • I have updated the documentation if necessary.
  • All existing tests pass.
  • I have added new tests to cover my changes.
  • My changes do not introduce any new warnings or errors.

Additional Comments

Reviewer Instructions

Author's Note

@mahdi-vajdi mahdi-vajdi changed the title Fix verify gensim installation version check Fix verify gensim and numpy installation version check Feb 8, 2025
@arxyzan
Copy link
Member

arxyzan commented Feb 8, 2025

Hi @mahdi-vajdi , thanks for the PR.
I have some notes on your changes and I'd like us to discuss it to have a solid merge.
I'll put my comments on the code below.

if (
not get_lib_version("numpy").startswith(REQUIRED_NUMPY_VERSION)
or not get_lib_version("gensim").startswith(REQUIRED_GENSIM_VERSION)
version.parse(numpy_version) < version.parse(REQUIRED_NUMPY_VERSION)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that the gensim version must actually be 4.3.2 and the numpy version must be 1.24.* not lower.

@@ -28,9 +30,12 @@

# Check if the right combo of gensim/numpy versions are installed
def _verify_gensim_installation():
numpy_version = importlib.metadata.version("numpy")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also use the get_lib_version under the utils which was already there and uses the exact same code you have here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants