Skip to main content

DescriptorSetDataCSV

DescriptorSetDataCSV​

DescriptorSetDataCSV(filename: str, **kwargs)

Bases: CSVParser

ApertureDB DescriptorSet Data.

Each row defines vector indexes on a descriptor class. Additional property columns become index metadata. Index definitions cannot be graph endpoints.

Note

Is backed by a CSV file with the following columns:

name, dimensions, engine, metric, PROP_NAME_N, constraint_PROP1

Example CSV file::

name,dimensions,engine,metric
dining_chairs,2048,IVF,L2
chandeliers,2048,IVF,L2
console_tables,2048,IVF,L2
...

The engine column holds an engine name or a list of names. The loader creates one index per selected engine using its default settings. To configure engine settings, the third column can instead be engines, holding that JSON object, for example "{""hnsw"": {""M"": 16}}".

Example code to create an instance:


data = DescriptorSetDataCSV("/path/to/DescriptorSetData.csv")
loader = ParallelLoader(client)
loader.ingest(data)

Info

In the above example, the first row implies to create a Descriptor set called dining_chairs. The Descriptors in that set would be expected to be an array of float32, of length 2048. When performing a search on this set, IVF engine would be used and the metric to compute the distance would be L2.