Builds the index using the specified training configuration. Required before efficient querying.
Prior to calling this, all queries will be conducted using encrypted exhaustive search.
After, they will be conducted using encrypted ANN search.
def train(self, n_lists: int = None, batch_size: int = None, max_iters: int = None, tolerance: float = None, max_memory: int = None)
(Optional) Number of inverted index lists to create in the index. When None, auto-determines based on the number of vectors in the index (equivalent to 0).
batch_size
int
None
(Optional) Size of each batch for training. When None, defaults to 2048.
max_iters
int
None
(Optional) Maximum number of iterations for training. When None, defaults to 100.
tolerance
float
None
(Optional) Convergence tolerance for training. When None, defaults to 1e-6.
max_memory
int
None
(Optional) Maximum memory to use for training. When None, defaults to 0 (no limit).
There must be at least 2 * n_lists or 10,000 (whichever is greater) vector embeddings in the index prior to to calling this function.