fix: calculate relevant docs on index instead of queries#950
Conversation
Signed-off-by: Michael Guenther <[email protected]>
JoanFM
left a comment
There was a problem hiding this comment.
Put it as draft until really ready for review
| match_batch_size=1, | ||
| limit=10, | ||
| ) | ||
| print(res) |
There was a problem hiding this comment.
remove print, there should be assertions
Signed-off-by: Michael Guenther <[email protected]>
| def test_embed_and_evaluate_on_real_data(two_embed_funcs, kwargs): | ||
| metric_names = ['precision_at_k', 'reciprocal_rank'] | ||
| metric_names = ['precision_at_k', 'reciprocal_rank', 'recall_at_k'] |
There was a problem hiding this comment.
Maybe add a test case for exclude_self = True/False
Codecov ReportBase: 85.21% // Head: 77.21% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #950 +/- ##
==========================================
- Coverage 85.21% 77.21% -8.00%
==========================================
Files 155 155
Lines 8048 8049 +1
==========================================
- Hits 6858 6215 -643
- Misses 1190 1834 +644
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Michael Guenther <[email protected]>
Signed-off-by: Michael Guenther <[email protected]>
a94f76d to
e1a74b9
Compare
Signed-off-by: Michael Guenther <[email protected]>
Goals:
The
num_relevant_documents_per_labelis calculated in theembed_and_evaluatemethod on the documents inself. However, this is only correct ifselfis matched against itself. Instead it should be calculated on theindex_dataattribute if it is provided.check and update documentation, if required. See guide