Skip to content

Commit

Permalink
Added guard rail in Big ANN so that only KNN datasets can be converte…
Browse files Browse the repository at this point in the history
…d...
  • Loading branch information
randersenYB committed Jul 24, 2024
1 parent 940e77e commit f348a78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aerospike/bigann/bigann_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ async def bigann_getinfo(self) -> None:
self._bigann_searchtype = str(self._bigann_ds.search_type())
self._bigann_default_search_count = int(self._bigann_ds.default_count())

if self._bigann_searchtype != "knn":
raise ValueError(f"The Big ANN Dataset {self._bigann_ds.short_name()} is defined with a type of {self._bigann_searchtype}. Conversion only supports 'KNN'.")

async def create_hdf(self) -> None:
import h5py
from string import digits
Expand Down

0 comments on commit f348a78

Please sign in to comment.