facebookresearch / StarSpace

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

loadBaseDocs() is called twice in query_predict utility #299

Open slvher opened 3 years ago

slvher commented 3 years ago

If model is trained with trainMode=0 and fileFormat="labelDoc", and the query_predict utility is started with savedModel (instead of model.tsv), loadBaseDocs() will be called twice, at L33 and L41 respectively. In such a situation, duplicated results will be returned by query_predict, due to labelDoc file is loaded twice.

$ ./bin/query_predict model/ss_model 6 data/basedoc.data

NOTE: "model/ss_model" is the savedModel name and "data/basedoc.data" is the basedoc file name.