Generate batches as an iterator for memory-efficient processing
(self, items: List[Any])
| 128 | return results |
| 129 | |
| 130 | def batch_iterator(self, items: List[Any]) -> Iterator[List[Any]]: |
| 131 | """Generate batches as an iterator for memory-efficient processing""" |
| 132 | for i in range(0, len(items), self.batch_size): |
| 133 | yield items[i:i + self.batch_size] |
| 134 | |
| 135 | class StreamingProcessor: |
| 136 | """Process items one at a time with minimal memory usage""" |
nothing calls this directly
no outgoing calls
no test coverage detected