Hi, I trained roberta-large with my own data by using run_sup_example.sh. But when I build index for senteced and use model.search, I encountered the error. The building process has no problem, the error is in model.search.
/site-packages/simcse/tool.py", line 64, in encode
total_batch = len(sentence) // batch_size + (1 if len(sentence) % batch_size > 0 else 0)
TypeError: object of type 'IndexFlatIP' has no len()
Hi, I trained
roberta-large
with my own data by usingrun_sup_example.sh
. But when I build index for senteced and usemodel.search
, I encountered the error. The building process has no problem, the error is inmodel.search
.