# tinker_cookbook.exceptions.DataValidationError

## _class_ [**tinker_cookbook.exceptions.DataValidationError**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/exceptions.py#L106) (_[DataError](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/exceptions/dataerror/)_)

Data fails a semantic validation check.

Raised when data is structurally correct but violates a logical constraint — e.g. streaming datasets cannot seek backward, or there are not enough tokens for an input/target split.

## Referenced by

- [tinker_cookbook.supervised.StreamingSupervisedDatasetFromHFDataset.get_batch](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/supervised/streamingsuperviseddatasetfromhfdataset/#streamingsupervisedatasetfromhfdataset-get_batch)
