Skip to content

Commit d39bf4e

Browse files
committed
Merge branch 'rfsaliev/cpp-runtime-binding' into eglaser/cpp-runtime-binding-fallback-test2
2 parents 20f2df6 + 9a16d53 commit d39bf4e

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

bindings/cpp/src/dynamic_vamana_index.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,19 @@ using DynamicVamanaIndexLeanVecImplManager =
126126

127127
// DynamicVamanaIndex interface implementation
128128
Status DynamicVamanaIndex::check_storage_kind(StorageKind storage_kind) noexcept {
129-
return runtime_error_wrapper([&] {
130-
return storage::is_supported_storage_kind(storage_kind)
131-
? Status_Ok
132-
: Status(
133-
ErrorCode::INVALID_ARGUMENT,
134-
"The specified storage kind is not compatible with the "
135-
"DynamicVamanaIndex"
136-
);
129+
bool supported = false;
130+
auto status = runtime_error_wrapper([&] {
131+
supported = storage::is_supported_storage_kind(storage_kind);
137132
});
133+
if (!status.ok()) {
134+
return status;
135+
}
136+
return supported ? Status_Ok
137+
: Status(
138+
ErrorCode::INVALID_ARGUMENT,
139+
"The specified storage kind is not compatible with the "
140+
"DynamicVamanaIndex"
141+
);
138142
}
139143

140144
Status DynamicVamanaIndex::build(

docker/x86_64/test-cpp-runtime-bindings.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ conda install -y -c conda-forge cmake=3.30.4 make=4.2 swig=4.0 "numpy>=2.0,<3.0"
3131
conda install -y -c conda-forge gxx_linux-64=14.2 sysroot_linux-64=2.17
3232
conda install -y mkl=2022.2.1 mkl-devel=2022.2.1
3333

34-
# TODO: point to root repo eventually
34+
# TODO: point to root repo eventually
3535
git clone -b svs-io https://github.com/ahuber21/faiss.git
3636
cd faiss
3737
sed -i "s|set(SVS_URL .*|set(SVS_URL \"file:///runtime_lib/svs-cpp-runtime-bindings${PLATFORM_NAME}.tar.gz\" CACHE STRING \"SVS URL\")|" faiss/CMakeLists.txt
@@ -46,7 +46,7 @@ cmake -DBUILD_TESTING=ON -DFAISS_ENABLE_SVS=ON -DFAISS_ENABLE_GPU=OFF ..
4646
make -j swigfaiss faiss_test
4747
echo "------------------------------------------------"
4848
echo " FAISS C++ tests: "
49-
./tests/faiss_test --gtest_filter=SVS.*
49+
./tests/faiss_test --gtest_filter="SVS.*:SVS_LL.*:SVS_NoLL.*"
5050
echo "------------------------------------------------"
5151
echo " FAISS python bindings: "
5252
cd faiss/python/

0 commit comments

Comments
 (0)