feat: local_builder simplify disable idmap (#239)

This commit is contained in:
egolearner 2026-03-18 14:42:00 +08:00 committed by GitHub
parent f9a5ef9432
commit e7c4a2f2b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -932,14 +932,17 @@ int do_build(YAML::Node &config_root, YAML::Node &config_common) {
cout << "Prepare data done!" << endl;
ailego::Params params;
if (g_disable_id_map) {
params.set(PARAM_HNSW_STREAMER_USE_ID_MAP, false);
params.set(PARAM_FLAT_USE_ID_MAP, false);
}
if (!prepare_params(config_root["BuilderParams"], params)) {
LOG_ERROR("Failed to prepare params");
return -1;
}
std::vector<std::string> id_map_param_list = {
PARAM_HNSW_STREAMER_USE_ID_MAP,
PARAM_FLAT_USE_ID_MAP,
};
for (auto &param : id_map_param_list) {
params.set(param, !g_disable_id_map);
}
// INIT
int ret =