Datasets (Inspect Components)
Inspect has native support for reading datasets in the CSV, JSON, and JSON Lines formats, as well as from Hugging Face.
from inspect_ai.dataset import csv_dataset, json_dataset
Dataset Samples
input
The input to be submitted to the model.
target
Optional. Ideal target output.
sandbox
Field Mapping
Filter and Shuffle
Hugging Face
pip install datasetsが必要
Typically datasets on Hugging Face will require specification of which split within the dataset to use (e.g. train, test, or validation) as well as some field mapping.
Under the hood, the hf_dataset() function is calling the load_dataset() function in the Hugging Face datasets package.