cerebras.modelzoo.data_preparation.data_preprocessing.hooks.text_read_hook#
- cerebras.modelzoo.data_preparation.data_preprocessing.hooks.text_read_hook(example, **read_hook_kwargs)[source]#
Transforms text data for reading.
- Parameters
example (Dict[str, Any]) – The input data containing text information.
**read_hook_kwargs (Any) – Additional keyword arguments containing data_keys.
- Returns
Transformed data suitable for reading.
- Return type
List[Dict[str, Any]]
- Raises
AssertionError – If required keys are not provided in read_hook_kwargs.