> This page is for Structured Data Models Client.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/sdgm/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/sdgm/_mcp/server.

# Quickstart: Kumo Tabular

> Score a labelled table in ten lines against a NIM serving kumo-tabular

This quickstart builds a `Request` directly from two small pandas DataFrames and runs a Kumo Tabular prediction through an NVIDIA NIM.

> **Note**
>
> The small tables are for API verification only. They do not contain enough labelled examples to assess prediction quality.

## Standard SDK workflow

After you install the SDK and make a `kumo-tabular` NIM available, use the following workflow:

1. Prepare the labelled rows (`context`) and the rows to score (`predict`).
2. Build a `Request`, naming the `target` column and the `task`.
3. Call `client.predict(request, model=KumoTabular())`.

The result is a `PredictionResult`; `to_pandas()` gives you a DataFrame.

## 1. Install the SDK

```bash
pip install structured-data-models-client
```

## 2. Prepare labelled and scored rows

```python
import pandas as pd

labelled = pd.DataFrame({
    "age": [31.0, 44.5, 28.0, 51.0, 39.0],
    "spend": [120.0, 430.0, 90.0, 510.0, 260.0],
    "churn": [0, 1, 0, 1, 0],
})

to_score = pd.DataFrame({
    "age": [33.0, 47.0],
    "spend": [150.0, 480.0],
})
```

`to_score` need not overlap with `labelled` at all: this model exists to score rows it has never seen.

## 3. Build the request

```python
from sdm_client import Request

request = Request(
    context=labelled,
    predict=to_score,
    target="churn",
    task="classification",
)
```

`context` must contain `target`; `predict` must not — those are the rows whose answer is being asked for. Every feature the model is shown in `context` has to be supplied for the rows being scored, except the primary key.

## 4. Run a prediction

```python
from sdm_client import SDMClient, KumoTabular

with SDMClient(url="http://localhost:8000") as client:
    result = client.predict(request, model=KumoTabular())

print(result.to_pandas())
```

The returned DataFrame includes `row_index` and, for classification, `prediction` and one `probability_<class>` column per class. The prediction values depend on the deployed model and the supplied context.

Pass `api_key` to `SDMClient` if your deployment has an authenticating gateway.

## Next steps

* [Learn the data requirements](/sdgm/kumo-tabular/user-guide/prepare-data/data-requirements)
* [Make predictions with PQL](/sdgm/kumo-tabular/user-guide/make-predictions/make-predictions)
* [Understand prediction results](/sdgm/kumo-tabular/user-guide/work-with-prediction-results/prediction-results)