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

Phrases model's saved connector_words not getting loaded, while loading saved phrases model #3124

Closed
aloknturing opened this issue Apr 20, 2021 · 4 comments

Comments

@aloknturing
Copy link

If we have saved the trained phrases model in this version i.e gensim version 4.0.0 or 4.0.1, while giving non empty connector_words. And If we try to load the saved model in this version itself. Then the connector_words of the loaded phrases model will be wrongly assigned empty frozen set. This is a functional bug and will result in some of the words not getting grouped in ngram

PR has been sent for this bug here: #3116

What are you trying to achieve? What is the expected result? What are you seeing instead?

I am trying to save and load a phrases model with non empty connector words after freezing it.
Expectation is that connector_words won't become empty after loading it after saving it.
But they become empty

Steps/code/corpus to reproduce

Go to this PR: #3116
Go to this commit where test has been added: 49dfe1b
This test will reproduce the bug

Versions

Please provide the output of:

import platform; print(platform.platform())
import sys; print("Python", sys.version)
import struct; print("Bits", 8 * struct.calcsize("P"))
import numpy; print("NumPy", numpy.__version__)
import scipy; print("SciPy", scipy.__version__)
import gensim; print("gensim", gensim.__version__)
from gensim.models import word2vec;print("FAST_VERSION", word2vec.FAST_VERSION)

Linux-5.4.0-72-generic-x86_64-with-debian-buster-sid
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0]
Bits 64
NumPy 1.19.4
SciPy 1.3.0
gensim 4.0.1
FAST_VERSION 1

@piskvorky
Copy link
Owner

piskvorky commented Apr 20, 2021

I don't understand. Are you reporting an issue that already has a PR fix submitted? Or did you find some problem with the fix?

@aloknturing
Copy link
Author

Yes I am trying to report this issue whose PR fix was submitted. In the guidelines its mentioned that issue needs to be raised before sending PR

@aloknturing
Copy link
Author

Let me delete it. I think its not required

@piskvorky
Copy link
Owner

piskvorky commented Apr 20, 2021

Yeah I don't think this adds anything.

"An issue before a PR" makes sense for a discussion whether something is indeed a bug, and what the solution should be. We're past that stage now.

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

No branches or pull requests

2 participants