kumoai.utils

View as Markdown

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


Datasets

from_relbench()

Creates a Kumo Graph from a RelBench benchmark dataset. The function downloads the dataset, uploads its tables to the Kumo data plane, and constructs a Graph with inferred metadata and edges.

1from kumoai.utils.datasets import from_relbench
2
3graph = from_relbench(dataset_name="rel-amazon")

This function is subject to the file size limits of FileUploadConnector. See the Connectors guide for details.

dataset_name
strRequired

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.

1from kumoai.utils.forecasting import ForecastVisualizer
2
3viz = ForecastVisualizer(holdout_df=result.holdout_df())
4viz.visualize()
holdout_df
pd.DataFrameRequired

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.