Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion bindings/python/src/vamana.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ void wrap(py::module& m) {
longer construction time. Should be larger than `graph_max_degree`.
max_candidate_pool_size: Limit on the number of candidates to consider
for neighbor updates. Should be larger than `window_size`.
The default value is ``graph_max_degree`` * 2.
The default value is ``window_size`` * 3.
prune_to: Amount candidate lists will be pruned to when exceeding the
target max degree. In general, setting this to slightly less than
``graph_max_degree`` will yield faster index building times. Default:
Expand Down
2 changes: 1 addition & 1 deletion include/svs/index/vamana/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ void verify_and_set_default_index_parameters(
) {
// Set default values
if (parameters.max_candidate_pool_size == svs::UNSIGNED_INTEGER_PLACEHOLDER) {
parameters.max_candidate_pool_size = 2 * parameters.graph_max_degree;
parameters.max_candidate_pool_size = 3 * parameters.window_size;
}

if (parameters.prune_to == svs::UNSIGNED_INTEGER_PLACEHOLDER) {
Expand Down
2 changes: 1 addition & 1 deletion include/svs/lib/preprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace svs {
inline constexpr size_t UNSIGNED_INTEGER_PLACEHOLDER = std::numeric_limits<size_t>::max();
inline constexpr float FLOAT_PLACEHOLDER = std::numeric_limits<float>::max();
inline constexpr float VAMANA_GRAPH_MAX_DEGREE_DEFAULT = 32;
inline constexpr float VAMANA_WINDOW_SIZE_DEFAULT = 64;
inline constexpr float VAMANA_WINDOW_SIZE_DEFAULT = 200;
inline constexpr bool VAMANA_USE_FULL_SEARCH_HISTORY_DEFAULT = true;
inline constexpr float VAMANA_ALPHA_MINIMIZE_DEFAULT = 1.2;
inline constexpr float VAMANA_ALPHA_MAXIMIZE_DEFAULT = 0.95;
Expand Down
4 changes: 2 additions & 2 deletions tests/svs/index/vamana/dynamic_index_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,10 @@ CATCH_TEST_CASE("Dynamic Vamana Index Default Parameters", "[parameter][vamana]"
index.get_construction_window_size() == svs::VAMANA_WINDOW_SIZE_DEFAULT
);
CATCH_REQUIRE(
index.get_max_candidates() == 2 * svs::VAMANA_GRAPH_MAX_DEGREE_DEFAULT
index.get_max_candidates() == 3 * svs::VAMANA_WINDOW_SIZE_DEFAULT
);
CATCH_REQUIRE(
index.get_full_search_history() == svs::VAMANA_USE_FULL_SEARCH_HISTORY_DEFAULT
);
}
}
}
4 changes: 2 additions & 2 deletions tests/svs/index/vamana/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ CATCH_TEST_CASE("Vamana Index Default Parameters", "[parameter][vamana]") {
index.get_construction_window_size() == svs::VAMANA_WINDOW_SIZE_DEFAULT
);
CATCH_REQUIRE(
index.get_max_candidates() == 2 * svs::VAMANA_GRAPH_MAX_DEGREE_DEFAULT
index.get_max_candidates() == 3 * svs::VAMANA_WINDOW_SIZE_DEFAULT
);
CATCH_REQUIRE(
index.get_full_search_history() == svs::VAMANA_USE_FULL_SEARCH_HISTORY_DEFAULT
);
}
}
}
Loading