Skip to navigation

SDM Client Library Documentation

View as MarkdownOpen in Claude

The Structured Data Models Client (SDM Client) library (structured-data-models-client, imported as sdm_client) is an open source Python client that sends prediction requests to a deployed Kumo Tabular or Kumo Relational NVIDIA NIM and returns the results as a pandas DataFrame.

When to Use the Client

Use the Client when you want:

  • A served model. A Kumo Tabular or Kumo Relational NIM runs inference on its own GPU. Your application only needs the Client and a reachable endpoint.
  • Predictive queries. For Kumo Relational, describe the task in Predictive Query Language (PQL) and the Client builds the context for you, including ranking and multi-step forecasts.
  • Data where it lives. Read tables in memory, or leave them in a warehouse or database and sample them with SQL at prediction time.

Use the SDM library instead when you want the model weights in your own Python process, control over tensors and sampling, fine-tuning, or the Kumo Forecast and Kumo Anomaly time series models.

To compare the models themselves, refer to Compare Models.

Where the NIM Can Run

The Client connects to a NIM you have already deployed. How it connects depends on where the NIM runs.

PlatformHow the Client connects
Snowflake (Snowpark Container Services)Call the NIM from a Snowflake notebook on Container Runtime, using the service’s internal address. Refer to the Snowflake guides for Kumo Tabular and Kumo Relational, and the Client’s Snowflake quickstart notebooks.
Databricks Model ServingConnect with SDMClient.for_databricks_serving(), using the endpoint name instead of a URL. In a Databricks notebook, the Client authenticates as the notebook. Documented for Kumo Relational: refer to Connect from Databricks.
Amazon SageMakerThe released Client cannot call a SageMaker endpoint directly. Send requests with boto3, as the SageMaker guides for Kumo Tabular and Kumo Relational show.

How the Client Works

One client serves both models. The model is an argument to predict(), not a different package:

result = client.predict(request, model=KumoTabular())

Every prediction follows the same path:

your tables → Schema → Request → SDMClient.predict(request, model=...) → NIM → PredictionResult

The path uses the following objects:

  • A Schema describes your tables and, for Kumo Relational, the relationships between them.
  • A Request holds the context rows, whose answer is known, and the predict rows you want scored. For Kumo Relational, a predictive query builds the request for you.
  • A PredictionResult converts to a pandas DataFrame with to_pandas().

A request built for one model is refused before anything is sent if you name the other model.

Install

The base install supports Kumo Tabular:

pip install structured-data-models-client

Kumo Relational also needs its native engine, on a supported Linux and Python runtime:

pip install "structured-data-models-client[relational]"

Each model’s setup page covers requirements and how to verify the endpoint.

Choose Your Model Guide

Select the guide for the model you plan to use.

If you have code written against the earlier kumo-relational-client, refer to Migrate to structured-data-models-client.

For release details, refer to the Release Notes.