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

Exp: Reduce pool size in prune #595

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix formatting
ravishankar committed Nov 5, 2024
commit baeb5261783fd134c9070d25a20ee7050d1f4cef
12 changes: 6 additions & 6 deletions src/index.cpp
Original file line number Diff line number Diff line change
@@ -1070,11 +1070,11 @@ void Index<T, TagT, LabelT>::occlude_list(const uint32_t location, std::vector<N
if (pool.size() > maxc)
pool.resize(maxc);
if (reduce_pool){
diskann::cout<<"Reducing pool size from "<<pool.size()<<" to "<<(size_t)(0.5*pool.size())<<std::endl;
float k = 0.5;
size_t new_pool_size = (size_t)(k*pool.size());
if (new_pool_size > 0)
pool.resize(new_pool_size);
// diskann::cout<<"Reducing pool size from "<<pool.size()<<" to "<<(size_t)(0.5*pool.size())<<std::endl;
// float k = 0.5;
// size_t new_pool_size = (size_t)(k*pool.size());
// if (new_pool_size > 0)
// pool.resize(new_pool_size);
}
std::vector<float> &occlude_factor = scratch->occlude_factor();
// occlude_list can be called with the same scratch more than once by
@@ -1569,7 +1569,7 @@ void Index<T, TagT, LabelT>::build_with_data_populated(const std::vector<TagT> &
}
diskann::cout << "Index built with degree: max:" << max << " avg:" << (float)total / (float)(_nd + _num_frozen_pts)
<< " min:" << min << " count(deg<2):" << cnt << std::endl;
diskann::cout << "Robust Prune Calls" << count_prune << std::endl;
diskann::cout << "Robust Prune Calls: " << count_prune << std::endl;

_has_built = true;
}