> ## Documentation Index
> Fetch the complete documentation index at: https://kumo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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 theme={null}
from kumoai.utils.datasets import from_relbench

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

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

<ParamField body="dataset_name" type="str" required>
  The name of the RelBench dataset to load (e.g. `"rel-amazon"`, `"rel-trial"`).
</ParamField>

**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 theme={null}
from kumoai.utils.forecasting import ForecastVisualizer

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

<ParamField body="holdout_df" type="pd.DataFrame" required>
  The holdout dataset from a `TrainingJobResult`. Obtain via `TrainingJobResult.holdout_df()`.
</ParamField>

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