Loading core/src/wrapper/ConfAdapter.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "wrapper/ConfAdapter.h" #include "knowhere/index/vector_index/helpers/IndexParameter.h" #include "utils/Log.h" #include "WrapperException.h" #include <cmath> #include <memory> Loading Loading @@ -146,8 +147,10 @@ IVFPQConfAdapter::MatchSearch(const TempMetaConf& metaconf, const IndexType& typ auto conf = std::make_shared<knowhere::IVFPQCfg>(); conf->k = metaconf.k; if (metaconf.nprobe <= 0) conf->nprobe = 16; // hardcode here if (metaconf.nprobe <= 0){ WRAPPER_LOG_ERROR << "The nprobe of PQ is wrong!"; throw WrapperException("The nprobe of PQ is wrong!"); } else conf->nprobe = metaconf.nprobe; Loading core/unittest/wrapper/test_wrapper.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ class KnowhereWrapperTest tempconf.size = nb; tempconf.dim = dim; tempconf.k = k; tempconf.nprobe = 16; index_ = GetVecIndexFactory(index_type); conf = ParamGenerator::GetInstance().GenBuild(index_type, tempconf); Loading Loading
core/src/wrapper/ConfAdapter.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "wrapper/ConfAdapter.h" #include "knowhere/index/vector_index/helpers/IndexParameter.h" #include "utils/Log.h" #include "WrapperException.h" #include <cmath> #include <memory> Loading Loading @@ -146,8 +147,10 @@ IVFPQConfAdapter::MatchSearch(const TempMetaConf& metaconf, const IndexType& typ auto conf = std::make_shared<knowhere::IVFPQCfg>(); conf->k = metaconf.k; if (metaconf.nprobe <= 0) conf->nprobe = 16; // hardcode here if (metaconf.nprobe <= 0){ WRAPPER_LOG_ERROR << "The nprobe of PQ is wrong!"; throw WrapperException("The nprobe of PQ is wrong!"); } else conf->nprobe = metaconf.nprobe; Loading
core/unittest/wrapper/test_wrapper.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ class KnowhereWrapperTest tempconf.size = nb; tempconf.dim = dim; tempconf.k = k; tempconf.nprobe = 16; index_ = GetVecIndexFactory(index_type); conf = ParamGenerator::GetInstance().GenBuild(index_type, tempconf); Loading