autointent.advisor.dataset_stats#
- autointent.advisor.dataset_stats(dataset)#
Summarize an in-memory
Datasetfor the advisor.Reads the train split (
train, ortrain_0once the dataset has been split) to count samples and measure utterance length — average and 95th percentile word counts, over at most the first 1000 rows — and takesn_classes,multilabelandhas_descriptionsfrom the dataset itself. Returns a placeholder when no train split is present.This is how a caller gets from a
Datasetto theDatasetStatsthatrun_preflight()andreduce_to_fit()require. UseDatasetStats.placeholder()instead when no dataset exists yet and you only want to size a search space against hypothetical numbers.- Parameters:
dataset (autointent.Dataset) – the dataset the pipeline would be fitted on.
- Returns:
Stats describing that dataset, with
source="dataset:in-memory".- Return type:
autointent.advisor._report.DatasetStats