facebookresearch / StarSpace

Learning embeddings for classification, retrieval and ranking.
MIT License
3.95k stars 531 forks source link

Fix duplicate results when doing prediction #281

Open Microsheep opened 4 years ago

Microsheep commented 4 years ago

Fixes: https://github.com/facebookresearch/StarSpace/issues/280

This fixes the problem with duplicate results when doing prediction due to loadBaseDocs been called twice. Once in initFromSavedModel and once in loadBaseDocs. This will generate duplicate entries in baseDocVectors_ which will be a problem in predictOne

facebook-github-bot commented 4 years ago

Hi @Microsheep!

Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

facebook-github-bot commented 4 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

everdark commented 4 years ago

I think the fix is not working due to initFromSavedModel still being called twice. Instead of removing the loadBaseDocs call from query_predict, we should remove the call in initFromSavedModel.