Skip to content

Commit

Permalink
fix test, lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jparismorgan committed Jul 16, 2024
1 parent a70a2b6 commit 45ae87b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/include/test/unit_api_ivf_pq_index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,9 @@ TEST_CASE("clear history with an open index", "[api_ivf_pq_index]") {

auto&& [scores_vector_array, ids_vector_array] =
index.query(QueryType::InfiniteRAM, training_vector_array, 1, 1);
auto&& [scores_vector_array_finite, ids_vector_array_finite] =
index.query(QueryType::FiniteRAM, training_vector_array, 1, 1);

auto second_index = IndexIVFPQ(ctx, index_uri);
auto&& [scores_vector_array_2, ids_vector_array_2] =
second_index.query(QueryType::InfiniteRAM, training_vector_array, 1, 1);
auto&& [scores_vector_array_finite_2, ids_vector_array_finite_2] =
auto&& [scores_vector_array_finite, ids_vector_array_finite] =
second_index.query(QueryType::FiniteRAM, training_vector_array, 1, 1);

// Here we check that we can clear_history() even with a index in memory. This
Expand Down
12 changes: 6 additions & 6 deletions src/include/test/unit_api_vamana_index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ TEST_CASE("storage_version", "[api_vamana_index]") {
}

TEST_CASE("clear history with an open index", "[api_ivf_pq_index]") {
auto ctx = tiledb::Context{};
auto ctx = tiledb::Context{};
using feature_type_type = uint8_t;
using id_type_type = uint32_t;
using adjacency_row_index_type_type = uint64_t;
Expand All @@ -489,11 +489,11 @@ TEST_CASE("clear history with an open index", "[api_ivf_pq_index]") {
vfs.remove_dir(index_uri);
}

auto index = IndexVamana(std::make_optional<IndexOptions>(
{{"feature_type", feature_type},
{"id_type", id_type},
{"l_build", std::to_string(l_build)},
{"r_max_degree", std::to_string(r_max_degree)}}));
auto index = IndexVamana(std::make_optional<IndexOptions>(
{{"feature_type", feature_type},
{"id_type", id_type},
{"l_build", std::to_string(l_build)},
{"r_max_degree", std::to_string(r_max_degree)}}));

auto training = ColMajorMatrixWithIds<feature_type_type, id_type_type>{
{{1, 1, 1}, {2, 2, 2}, {3, 3, 3}, {4, 4, 4}}, {1, 2, 3, 4}};
Expand Down

0 comments on commit 45ae87b

Please sign in to comment.