From a1d9b168f41065cd67b83268cfef9e9f4d8a1b3c 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 2da00493b..59e11fc09 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));