dataeval.data.Limit

class dataeval.data.Limit(size)

Cap the dataset to the first size items currently selected.

Applied in place, in pipeline order: Limit truncates whatever selection precedes it, so [Shuffle(), Limit(100)] keeps a random 100 while [Limit(100), Shuffle()] shuffles the first 100. Chaining is allowed — [Limit(1000), Shuffle(), Limit(100)] keeps a random 100 of the first 1000.

Parameters:
size : int

The maximum size of the dataset.

apply(view)

Apply this operation by mutating view in place.

apply_metadata(metadata)

Return possibly-updated dataset-level metadata (default: unchanged).