Quickstart: Kumo Relational
This quickstart uses local pandas DataFrames to build a relational schema and run a Kumo Relational prediction through an NVIDIA NIM.
The small tables are for API verification only. They do not contain enough historical examples to assess prediction quality.
Standard SDK workflow
After you install the SDK and make the Kumo Relational NIM available, use the following workflow:
- Prepare the related tables.
- Build a
Schemawithsdm_client.Schema.from_data()and review the inferred metadata and relationships. - Write the prediction task in PQL.
- Materialize a
RequestwithPredictiveQuery(...).materialize(indices=...). - Call
predict()with the request and theKumoRelationalmodel.
The result is a PredictionResult; to_pandas() gives you a DataFrame.
1. Install the SDK
2. Prepare relational data
3. Build a schema
Schema.from_data() infers table metadata and relationships from the DataFrames you give it. Treat this inference as a starting point; the following pages explain how to inspect and correct it. For tables too large to load into memory, Schema.from_source samples a warehouse or database directly.
4. Run a prediction
Write the question in PQL, materialize it against the entities you want scored, and predict:
This standalone example uses a context manager to create and close the client. For an application or notebook that makes multiple requests, follow the reusable client pattern.
The returned DataFrame includes row_index and, for this scalar task, prediction and probability_<class> columns. The prediction value depends on the deployed model and the supplied context.
Pass api_key to SDMClient if your deployment has an authenticating gateway.