KumoRFM, including run modes, batch prediction, and retry handling.
Run Modes
Therun_mode parameter controls the trade-off between prediction quality and speed by adjusting how much context data is sampled.
| Run Mode | Context Size | Neighbor Sampling | Use Case |
|---|---|---|---|
DEBUG | 100 | [16, 16, 4, 4, 1, 1] | Quick iteration, testing queries |
FAST | 1,000 | [32, 32, 8, 8, 4, 4] | Default. Good balance of speed and quality |
NORMAL | 5,000 | [64, 64, 8, 8, 4, 4] | Higher quality predictions |
BEST | 10,000 | [64, 64, 8, 8, 4, 4] | Maximum quality |
Batch Mode
For predictions over many entities, useKumoRFM.batch_mode() to automatically split the workload into batches:
batch_size: The number of entities per batch. Set to"max"(default) to use the maximum applicable batch size for the task type.num_retries: Number of retries for failed batches due to server issues.
| Task Type | Max Prediction Size | Max Test Size |
|---|---|---|
| Classification / Regression / Forecasting | 1,000 | 2,000 |
Retry
UseKumoRFM.retry() to automatically retry failed queries due to transient server issues:
Size Limits
KumoRFM enforces a 30 MB context size limit per prediction. If exceeded, you will see an error message suggesting:- Reducing the number of tables in the graph
- Reducing the number of columns (e.g., large text columns)
- Adjusting the neighborhood configuration
- Using a lower run mode
optimize parameter in KumoRFM can help with database backends by creating indices for faster sampling: