Quickstart: Kumo Relational Client
Use the Kumo Relational Client to prepare a prediction request and send it to a
Kumo Relational NIM. In this quickstart, you build a relational graph from local
pandas DataFrames, bind it to RelationalClient, and receive predictions from
the deployed model. Model inference runs in the NIM.
The small tables are for API verification only. They do not contain enough historical examples to assess prediction quality.
Before you begin
You need:
- A Python environment that meets the client requirements.
- The URL of a running Kumo Relational NIM that your environment can reach.
- An API key if a gateway in front of the NIM requires authentication.
If you do not have a reachable NIM endpoint, follow Deploy, Install, and Connect first.
1. Install the SDK
2. Prepare relational data
3. Build a graph
Import the relational module, the SDK interface that constructs a Kumo Relational graph, and then infer the graph from the tables:
For production data, review the inferred table metadata and relationships before running predictions. Refer to Build a Graph.
4. Run a prediction
The sample query asks whether user 1 will place at least one order during the next 30 days.
Bind the graph to the client so the prediction can use the tables and their relationships, then send the query to your NIM endpoint:
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.
Replace http://localhost:8000 with your NIM endpoint URL if it runs elsewhere.
A successful request returns a pandas DataFrame with an ENTITY column and, for this single-value prediction, a PREDICTION column.
A temporal request also includes ANCHOR_TIMESTAMP.
The prediction value depends on the deployed model and the supplied context.
Pass api_key to RelationalClient if a gateway in front of your deployment requires authentication.