liveBook · Manning

Hugging Face Datasets

As explained in Building LLM Applications with DSPy

Hugging Face Datasets is a Python library for downloading, processing, sharing, and loading machine-learning datasets.

Hugging Face Datasets downloads named datasets from a repository and can format them as pandas dataframes. Dataset splits commonly include train and test, and sometimes validation. For an ATIS baseline, the test split alone is used. section 3.2

Listing 3.1 Downloading the dataset
from datasets import load_dataset
import pandas as pd

ds = load_dataset("tuetschek/atis")
ds.set_format(type='pandas')
df = ds['test'][:]

Load the ATIS dataset, format it as pandas, and select its test split. section 3.2

How Building LLM Applications with DSPy covers it

How deep it goes
Demonstrates installation, loading, pandas formatting, and split selection, but defers prompt optimization.
Examples
Uses airline customer-service requests from ATIS and loads its test split.
What you can do after
Apply via Hugging Face Datasets to load the ATIS test split as a pandas dataframe.
How it connects
Connects dataset repositories with pandas dataframes and train, validation, and test splits.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building LLM Applications with DSPy. The section links point to the parts of the book it draws on.