stanford-futuredata / ColBERT

ColBERT: state-of-the-art neural search (SIGIR'20, TACL'21, NeurIPS'21, NAACL'22, CIKM'22, ACL'23, EMNLP'23)
MIT License
2.67k stars 355 forks source link

type object 'ColBERT' has no attribute 'segmented_maxsim' #324

Closed Jimmy9507 closed 3 months ago

Jimmy9507 commented 3 months ago
2024-03-08T00:46:03.851Z | File "/usr/local/lib/python3.8/site-packages/colbert/modeling/colbert.py", line 202, in colbert_score_packed
return ColBERT.segmented_maxsim(scores, D_lengths)
type object 'ColBERT' has no attribute 'segmented_maxsim'

Did I miss anything?

Jimmy9507 commented 3 months ago

Figured out the reason: need to initial a ColBERT class to load segmented_maxsim.cpp https://github.com/stanford-futuredata/ColBERT/blob/main/colbert/modeling/colbert.py#L34