Skip to main content

vector_index

superduper.components.vector_index

Source code

sqlvector​

sqlvector(shape)
ParameterDescription
shapeThe shape of the vector

Create an encoder for a vector (list of ints/ floats) of a given shape.

This is used for compatibility with SQL databases, as the default vector

vector​

vector(shape,
identifier: Optional[str] = None)
ParameterDescription
shapeThe shape of the vector
identifierThe identifier of the vector

Create an encoder for a vector (list of ints/ floats) of a given shape.

VectorIndex​

VectorIndex(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: str = None,
*,
artifacts: 'dc.InitVar[t.Optional[t.Dict]]' = None,
indexing_listener: superduper.components.listener.Listener,
compatible_listener: Optional[superduper.components.listener.Listener] = None,
measure: superduper.vector_search.base.VectorIndexMeasureType = <VectorIndexMeasureType.cosine: 'cosine'>,
metric_values: Optional[Dict] = None) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
artifactsA dictionary of artifacts paths and DataType objects
indexing_listenerListener which is applied to created vectors
compatible_listenerListener which is applied to vectors to be compared
measureMeasure to use for comparison
metric_valuesMetric values for this index

A component carrying the information to apply a vector index.

DecodeArray​

DecodeArray(self,
dtype)
ParameterDescription
dtypeDatatype of array

Class to decode an array.

EncodeArray​

EncodeArray(self,
dtype)
ParameterDescription
dtypeDatatype of array

Class to encode an array.