MCPcopy Create free account
hub / github.com/PromtEngineer/localGPT / batch_iterator

Method batch_iterator

rag_system/utils/batch_processor.py:130–133  ·  view source on GitHub ↗

Generate batches as an iterator for memory-efficient processing

(self, items: List[Any])

Source from the content-addressed store, hash-verified

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
135class StreamingProcessor:
136 """Process items one at a time with minimal memory usage"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected