From b2123294bb3ed9e28185729969d615fe33b0823c Mon Sep 17 00:00:00 2001 From: Philip Adams Date: Thu, 19 May 2022 22:35:50 -0700 Subject: [PATCH] Fix reconstruct tests Cherry-picked-from: commit 1e8797846bad538c2b609c0da363e7156fed2f97 Fixes: https://github.com/microsoft/SPTAG/issues/315 --- Test/src/ReconstructIndexSimilarityTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Test/src/ReconstructIndexSimilarityTest.cpp b/Test/src/ReconstructIndexSimilarityTest.cpp index e7cf7a2ff..44aa0fde8 100644 --- a/Test/src/ReconstructIndexSimilarityTest.cpp +++ b/Test/src/ReconstructIndexSimilarityTest.cpp @@ -165,7 +165,7 @@ void GenerateReconstructData(std::shared_ptr& real_vecset, std::share if (ptr == nullptr || !ptr->Initialize(CODEBOOK_FILE.c_str(), std::ios::binary | std::ios::in)) { BOOST_ASSERT("Canot Open CODEBOOK_FILE to read!" == "Error"); } - quantizer->LoadIQuantizer(ptr); + quantizer = COMMON::IQuantizer::LoadIQuantizer(ptr); BOOST_ASSERT(quantizer); std::shared_ptr options(new Helper::ReaderOptions(GetEnumValueType(), m, VectorFileType::DEFAULT)); @@ -247,7 +247,7 @@ void GenerateReconstructData(std::shared_ptr& real_vecset, std::share if (!ptr->Initialize(CODEBOOK_FILE.c_str(), std::ios::binary | std::ios::in)) { BOOST_ASSERT("Canot Open CODEBOOK_FILE to read!" == "Error"); } - quantizer->LoadIQuantizer(ptr); + quantizer = COMMON::IQuantizer::LoadIQuantizer(ptr); BOOST_ASSERT(quantizer); rec_vecset.reset(new BasicVectorSet(ByteArray::Alloc(sizeof(R) * n * m), GetEnumValueType(), m, n));