In CyborgDB Service, training is typically handled automatically by the service. However, you can explicitly trigger training once enough vectors have been added.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
n_lists | int | None | (Optional) Number of inverted lists to use for the index. When None, auto-selects based on the dataset size |
batch_size | int | None | (Optional) Number of vectors to process per training batch. When None, the server uses 2048 |
max_iters | int | None | (Optional) Maximum number of training iterations. When None, the server uses 100 |
tolerance | float | None | (Optional) Convergence tolerance for training completion. When None, the server uses 1e-6 |
Training is a compute-intensive operation that may take several seconds to minutes depending on the index size and configuration.
Returns
None
Exceptions
Error
Error
- Throws if the API request fails due to network connectivity issues.
- Throws if authentication fails (invalid API key).
- Throws if the encryption key is invalid for the specified index.
- Throws if there are insufficient resources to complete training.
Training Errors
Training Errors
- Throws if the index has no vectors to train on.
- Throws if the index configuration is incompatible with training.
- Throws if training parameters are out of valid ranges.
- Throws if training fails to converge within the specified parameters.