# tinker_cookbook.stores.IncrementalReader ## *class* [**tinker_cookbook.stores.IncrementalReader**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/stores/_incremental.py#L22)() Reads a JSONL file incrementally, tracking the byte offset. Only new bytes since the last `read()` are parsed. Memory is bounded to `max_records` — oldest records are dropped when the limit is hit. Uses `Storage.read_range()` for efficient partial reads. Thread-safe: a `threading.Lock` protects all mutations so concurrent SSE connections sharing the same [`TrainingRunStore`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/stores/trainingrunstore/index.md) don't race. Created lazily by stores to preserve pickle-serializability of the parent store object. ### *property* [**records**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/stores/_incremental.py#L48) All buffered records (copy). Bounded by `max_records`. **Returns:** *list\[dict[str, Any]\]* ### *property* [**total_read**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/stores/_incremental.py#L54) Total number of records read since creation (not bounded by max_records). **Returns:** *int* ### *property* [**known_keys**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/stores/_incremental.py#L60) All metric keys seen (excluding 'step'). **Returns:** *set[str]* ### [**read**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/stores/_incremental.py#L65)() Read new lines since last call. Returns only new records. **Returns:** *list\[dict[str, Any]\]* ### [**aread**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/stores/_incremental.py#L109)() Async version of `read()`. **Returns:** *list\[dict[str, Any]\]* ### [**has_data**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/stores/_incremental.py#L113)() Return `True` if records exist in memory or on disk. **Returns:** *bool* ## Referenced by - [tinker_cookbook.stores.FsspecStorage](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/stores/fsspecstorage/index.md)