descent.utils.dataset
Utilities for working with datasets.
Functions
|
Iterate over a Hugging Face Dataset, yielding each 'row' as a dictionary. |
- descent.utils.dataset.iter_dataset(dataset: Dataset) Iterator[dict[str, Any]][source]
Iterate over a Hugging Face Dataset, yielding each ‘row’ as a dictionary.
- Args:
dataset: The dataset to iterate over.
- Yields:
A dictionary representing a single entry in the batch, where each key is a column name and the corresponding value is the entry in that column for the current row.