Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax ivf-flat test recall thresholds #766

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cpp/test/spatial/ann_ivf_flat.cu
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ auto eval_knn(const std::vector<T>& expected_idx,
RAFT_LOG_INFO("Recall = %zu/%zu", match_count, total_count);
double actual_recall = static_cast<double>(match_count) / static_cast<double>(total_count);
if (actual_recall < min_recall - eps) {
RAFT_LOG_WARN("Recall is suspiciously too low (%f < %f)", actual_recall, min_recall);
if (match_count == 0 || actual_recall < min_recall * min_recall - eps) {
if (actual_recall < min_recall * min_recall - eps) {
RAFT_LOG_ERROR("Recall is much lower than the minimum (%f < %f)", actual_recall, min_recall);
} else {
RAFT_LOG_WARN("Recall is suspiciously too low (%f < %f)", actual_recall, min_recall);
}
if (match_count == 0 || actual_recall < min_recall * std::min(min_recall, 0.5) - eps) {
return testing::AssertionFailure()
<< "actual recall (" << actual_recall
<< ") is much smaller than the minimum expected recall (" << min_recall << ").";
Expand Down