facebookresearch / StarSpace

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

Implement python wrappers for predictions and tune speed #272

Closed Ansud closed 5 years ago

Ansud commented 5 years ago
  1. Predict now use std::set instead priority_queue. From my point of view it is better to maintain set of fixed size and drop predictions with too low score immideately instead storing them in ordered manner.
  2. Implemented extension class of StarSpace to make things a bit more pythonic. It is definitely better to have return value instead of passing parameters to fill to functions. From my point of view, speed is not changed in case modern C++ compilers handle return of complex values properly without copying them.