Skip to content

Commit

Permalink
fix knowhere ut (#918)
Browse files Browse the repository at this point in the history
Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
  • Loading branch information
foxspy authored Nov 1, 2024
1 parent e67abe7 commit d910018
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ut/test_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
#include "index/flat/flat_config.h"
#include "index/hnsw/hnsw_config.h"
#include "index/ivf/ivf_config.h"
#include "index/sparse/sparse_inverted_index_config.h"
#include "knowhere/config.h"
#include "knowhere/index/index_factory.h"
#include "knowhere/version.h"
#ifdef KNOWHERE_WITH_DISKANN
#include "index/diskann/diskann_config.h"
#include "index/sparse/sparse_inverted_index_config.h"
#endif
#ifdef KNOWHERE_WITH_RAFT
#include "index/gpu_raft/gpu_raft_cagra_config.h"
Expand Down
2 changes: 2 additions & 0 deletions tests/ut/test_index_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,14 @@ TEST_CASE("Test index has raw data", "[IndexHasRawData]") {

// diskann
#ifdef KNOWHERE_WITH_DISKANN
#ifndef KNOWHERE_WITH_CARDINAL
CHECK(knowhere::IndexStaticFaced<fp32>::HasRawData(IndexEnum::INDEX_DISKANN, ver,
knowhere::Json::parse(R"({"metric_type": "L2"})")));
CHECK_FALSE(knowhere::IndexStaticFaced<fp32>::HasRawData(IndexEnum::INDEX_DISKANN, ver,
knowhere::Json::parse(R"({"metric_type": "IP"})")));
CHECK(knowhere::IndexStaticFaced<fp32>::HasRawData(IndexEnum::INDEX_DISKANN, ver,
knowhere::Json::parse(R"({"metric_type": "COSINE"})")));
#endif
#endif
// gpu index

Expand Down

0 comments on commit d910018

Please sign in to comment.