train() waits until training finishes before returning.
Parameters
Parameter values aren’t range-checked: an out-of-range value such as a negative list count is accepted, and training is skipped as described in Requirements.
Requirements
Training only runs when all three hold:- The index has at least 10,000 vectors.
- It has at least twice as many vectors as
n_lists. - The vector dimension is a multiple of 32, such as 384, 768, or 1536.
Returns
None. If the index is already training, train() waits for that run to finish, then trains again.
Exceptions
cyborgdb.AuthenticationError
cyborgdb.AuthenticationError
The client isn’t using the root key, or the
index_key is invalid (HTTP 401/403). Training requires the root key.cyborgdb.NotFoundError
cyborgdb.NotFoundError
The index doesn’t exist (HTTP
404).cyborgdb.ServiceError / cyborgdb.TransportError
cyborgdb.ServiceError / cyborgdb.TransportError
The service returns
5xx or can’t be reached. A failed training run doesn’t raise; see Requirements.