SDM Library Documentation
Structured Data Models (SDM) is an open source PyTorch library that loads pretrained Kumo foundation models and runs them in your own Python process. You work directly with the models, their tensors, and their preprocessing.
When to Use SDM
Use SDM when you want the following:
- The model in your process. Weights load into your Python process and run on your CPU or GPU. Your data does not leave your environment.
- Direct control. You build the tensors, choose the context, tune the recipe and ensemble, sample related tables yourself, and can fine-tune the weights.
- Time series models. Kumo Forecast and Kumo Anomaly run through Kumo-TS, a companion library that SDM’s installation and guides cover.
- Baselines. SDM includes reference implementations of other published tabular models, TabICLv2 and TabFM, behind the same interface.
Use the SDM Client library instead when a Kumo Tabular or Kumo Relational NIM is already deployed, or when you want to describe tasks in Predictive Query Language and sample related tables from a warehouse in place.
To compare the models themselves, refer to Compare Models.
How SDM Works
The following diagram shows how your data flows through a pretrained model:
Kumo Tabular and Kumo Relational follow the same workflow in SDM:
- Load your data from pandas, Arrow, or cuDF as a
TableTensor, which records a semantic type for each column. - Split its rows into context rows, whose outcome you already know, and query rows you want predicted.
- Pass both to a pretrained model. For Kumo Relational, also pass the linked tables and their keys as
RelatedTables. - Read the predictions, returned as a
TableTensorthat converts back to pandas.
Each model ships a recipe for preprocessing and postprocessing, and averages several randomized passes (num_estimators) for stability. You can adjust both.
The models share one interface, so you can swap one for another, or for a baseline, on the same data.
User Guide
Continue with one of the following pages:
For constructor and forward parameters of every model, refer to the API reference.