# 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/index.md)*) 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/#streamingsuperviseddatasetfromhfdataset-get_batch)