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 backwards compatibility bug in Word2Vec #3415

Merged
merged 2 commits into from Dec 16, 2022

Conversation

mpenkov
Copy link
Collaborator

@mpenkov mpenkov commented Dec 15, 2022

Fix #3413

@piskvorky piskvorky added this to the Next release milestone Dec 15, 2022
@mpenkov mpenkov merged commit db90a6a into develop Dec 16, 2022
@mpenkov mpenkov deleted the fix-backwards-compatibility branch December 16, 2022 13:12
path = datapath('model-from-gensim-3.8.0.w2v')
model = word2vec.Word2Vec.load(path)
x = model.score(['test'])
assert x is not None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should probably be a self.assertSomething() call, rather than a language assert for both consistency with other tests & rare case where someone may have disabled language-asserts via command-line. And, relying on the (maybe not possible to support indefinitely) score() function to probe model completeness, when that's not declared as tested in method name, could create maintenance headaches at some later date.

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.

Can not open and score a Word2vec model generated in v3.8.0 in v4.2.0
3 participants