> 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.

# kumoai.utils

> Dataset utilities and forecast visualization

The `kumoai.utils` module provides helpers for loading sample datasets and visualizing model outputs.

***

## Datasets

### `from_relbench()`

Creates a Kumo `Graph` from a [RelBench](https://relbench.stanford.edu/) benchmark dataset. The function downloads the dataset, uploads its tables to the Kumo data plane, and constructs a `Graph` with inferred metadata and edges.

```python
from kumoai.utils.datasets import from_relbench

graph = from_relbench(dataset_name="rel-amazon")
```

This function is subject to the file size limits of `FileUploadConnector`. See the [Connectors guide](/sdk/kumoai-connector#uploading-your-own-data) for details.

The name of the RelBench dataset to load (e.g. `"rel-amazon"`, `"rel-trial"`).

**Returns** `Graph` — A `Graph` containing the dataset's tables and inferred edges.

**Raises** `ValueError` if the dataset cannot be retrieved or processed.

***

## Visualization

### `ForecastVisualizer`

An interactive visualization tool for inspecting forecast results produced by a trained Kumo model. Renders time series plots with actuals vs. predictions and residual diagnostics for each entity.

```python
from kumoai.utils.forecasting import ForecastVisualizer

viz = ForecastVisualizer(holdout_df=result.holdout_df())
viz.visualize()
```

The holdout dataset from a `TrainingJobResult`. Obtain via `TrainingJobResult.holdout_df()`.

#### `visualize()`

Renders an interactive Plotly figure with per-entity time series plots and residual diagnostics. Entity selection is available via dropdown buttons in the chart.