Skip to content

Conversation

@globba
Copy link
Contributor

@globba globba commented Sep 29, 2022

Fixes issue #3388

Since Gensim 4.0,'key' in FastTextKeyedVectors always returns True by design.
This resulted in vectors not being added when performing FastTextKeyedVectors.add_vectors() due to the way that in_vocab_mask was being created.
The proper way to check if a key already exists is with 'key' in FastTextKeyedVectors.key_to_index.

Since Gensim 4.0, 'key' in FastTextKeyedVectors always returns True by design.
The proper way to check if a key already exists is with 'key' in FastTextKeyedVectors.key_to_index.
@piskvorky piskvorky added this to the Next release milestone Sep 29, 2022
@mpenkov mpenkov added the bug Issue described a bug label Oct 16, 2022
@mpenkov mpenkov requested a review from gojomo October 16, 2022 03:59
@piskvorky
Copy link
Owner

@gojomo please review so we can merge.

@mpenkov
Copy link
Collaborator

mpenkov commented Dec 6, 2022

@gojomo Ping

@mpenkov mpenkov changed the title Fixed issue when using add_vector with FastTextKeyedVectors Fixed FastTextKeyedVectors handling in add_vector Dec 7, 2022
@gojomo
Copy link
Collaborator

gojomo commented Dec 9, 2022

Looks good to me!

@mpenkov
Copy link
Collaborator

mpenkov commented Dec 12, 2022

Thank you @globba !!

@mpenkov mpenkov merged commit 50a9e6b into piskvorky:develop Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue described a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants