KumoRFM, including run modes, temporal behavior, inference behavior, 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.
For forecasting tasks, when an entity has more historical rows than the Context Size cap, KumoRFM uses the most recent N rows (not the oldest). This ensures forecasts reflect the latest data patterns.
Temporal and Context Timing
Use these parameters inKumoRFM.predict() and KumoRFM.evaluate() when you need to control the prediction timestamp or the historical examples used as model context.
For example, set
anchor_time when you want to predict as of a specific point in time:
context_anchor_time when the prediction date and the latest available context data should differ:
lag_timesteps when recent historical target values should be available to the model as additional context. For example, lag_timesteps=3 adds the previous three target windows as lagged features:
Inference Configuration
Theinference_config parameter controls inference-time model behavior, including ensembling. You can pass either a dictionary or a configuration object from kumoapi.rfm.
When you pass a dictionary, KumoRFM casts it based on the task type:
- Classification tasks use
ClassificationInferenceConfig. - Regression and forecasting tasks use
RegressionInferenceConfig.
inference_config, KumoRFM selects defaults automatically based on the task type.
Common options:
Classification option:
Regression and forecasting options:
When
output_type="quantiles", the prediction output contains 27 quantile columns instead of a single TARGET_PRED column:
Output and Collection Controls
These options control whatpredict() returns and how KumoRFM collects valid context labels.
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.
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: