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

Apply <> for delimiting instance params in str function of Vocab class #2921

Closed

Conversation

policyglot
Copy link

Fixes #2890

Please ignore the name of the branch- I was working on another idea when I noticed the open issue above.

Replaced double quotes with <>. This fix does not change the behavior of the 'str' function within the Vocab class of keyedvectors.py. It is only intended to address the change in conventions for delimiting instance parameters.

@gojomo
Copy link
Collaborator

gojomo commented Aug 21, 2020

Note that the original Vocab class no longer exists, except as a temporary renamed CompatVocab shim retained for backward compatibility when deserializing older models. (Still, its instances are thrown away as soon as the loaded models are converted to current format - so while this formatting fix could be applied, it's a largely moot issue.)

If you're relying on the old Vocab class behavior at all - especially the way arbitrary extra attributes could be added – be sure to take a look at the big changes in the current develop branch, building towards gensim-4.0.0, where you'll need to use a new facility (get_vecattr(), set_vecattr()) to hang new values on word-vectors. (If your extra attributes are the same type and applied to all items, the new approach may offer a speed/size benefit.)

@piskvorky
Copy link
Owner

piskvorky commented Aug 22, 2020

PR doesn't merge currently, there are conflicts. Can you fix that?
But like @gojomo says, these conflicts may be fundamental – please make sure to start off any branches off the current develop.

@mpenkov mpenkov added the stale Waiting for author to complete contribution, no recent effort label Jun 22, 2021
@piskvorky piskvorky closed this Feb 19, 2022
@piskvorky
Copy link
Owner

Closing – please let us know if you see any such str formatting issues in the latest Gensim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Waiting for author to complete contribution, no recent effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply new convention of delimiting instance params in str function
4 participants