Training & Predictions
Training & Predictions
Starting with raw data (as SourceTable objects), you created a Graph of Kumo Table objects and defined a PredictiveQuery. Now you can train a model and generate predictions.
Creating a Trainer
Training requires a ModelPlan, which defines the search space of model configurations. Generate one from your predictive query:
The model plan can be edited with full granularity — see the Model Plan reference for customizable attributes. Once ready, create a Trainer:
Training a Model
Call fit() with your graph and training table:
The Kumo SDK makes extensive use of non_blocking as an optional parameter for long-running operations. Setting this flag to True lets a long-running operation return immediately, returning a Future object that tracks the operation as it runs in the background. Setting this flag to False lets it wait until completion before returning.
Viewing Metrics and Artifacts
A completed training job exposes metrics and artifacts:
Generating Batch Predictions
Once a model has been trained, generate batch predictions and write to an external data source:
Full Code Example
A complete end-to-end example on the CustomerLTV dataset:
Polling Job Status
Any job scheduled with non_blocking=True returns a Future object with methods to track progress:
The same pattern applies to prediction jobs, training table jobs, and prediction table jobs.
Next Steps
While this example covered the core concepts, the SDK provides much more advanced functionality to help improve model iteration speed, evaluate champion/challenger models in production use-cases, integrate cleanly with upstream and downstream data pipelines, and more.