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

Remove diskann pramaters check in diskann.cc #169

Merged
merged 1 commit into from
Nov 16, 2023
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
10 changes: 0 additions & 10 deletions src/index/diskann/diskann.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ class DiskANNIndexNode : public IndexNode {
namespace knowhere {
namespace {
static constexpr float kCacheExpansionRate = 1.2;
static constexpr int kSearchListSizeMaxValue = 200;

Status
TryDiskANNCall(std::function<void()>&& diskann_call) {
Expand Down Expand Up @@ -522,15 +521,6 @@ DiskANNIndexNode<T>::Search(const DataSet& dataset, const Config& cfg, const Bit
if (!CheckMetric(search_conf.metric_type.value())) {
return expected<DataSetPtr>::Err(Status::invalid_metric_type, "unsupported metric type");
}
auto max_search_list_size = std::max(kSearchListSizeMaxValue, search_conf.k.value() * 10);
if (search_conf.search_list_size.value() > max_search_list_size ||
search_conf.search_list_size.value() < search_conf.k.value()) {
auto msg = fmt::format(
"search_list_size should be in range: [topk, max(200, topk * 10)], topk = {}, search_list_size = {}",
search_conf.k.value(), search_conf.search_list_size.value());
LOG_KNOWHERE_ERROR_ << msg;
return expected<DataSetPtr>::Err(Status::out_of_range_in_json, msg);
}
auto k = static_cast<uint64_t>(search_conf.k.value());
auto lsearch = static_cast<uint64_t>(search_conf.search_list_size.value());
auto beamwidth = static_cast<uint64_t>(search_conf.beamwidth.value());
Expand Down