Skip to content

Reset distance function in __setstate__#240

Merged
lmcinnes merged 1 commit intolmcinnes:masterfrom
smartIU:master
May 13, 2024
Merged

Reset distance function in __setstate__#240
lmcinnes merged 1 commit intolmcinnes:masterfrom
smartIU:master

Conversation

@smartIU
Copy link
Contributor

@smartIU smartIU commented May 13, 2024

Resetting the distance function in setstate, so evaluations like "dist == pynnd_dist.bit_hamming" work as intended after unpickle. Otherwise trying to load a pickled model with bitpacked vectors will fail in _init_search_function.

Resetting the distance function in __setstate__, so evaluations like "dist == pynnd_dist.bit_hamming" work as intended after unpickle
@lmcinnes
Copy link
Owner

Great work, thank you!

@lmcinnes lmcinnes merged commit ac9cc12 into lmcinnes:master May 13, 2024
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