diff --git a/src/litdata/streaming/item_loader.py b/src/litdata/streaming/item_loader.py index 4adc4d6f..7c8b5a64 100644 --- a/src/litdata/streaming/item_loader.py +++ b/src/litdata/streaming/item_loader.py @@ -313,7 +313,7 @@ def _load_chunk(self, chunk_index: int, chunk_filepath: str) -> None: offset = (1 + chunk["chunk_size"] + 1) * 4 mmap = np.memmap(chunk_filepath, mode="r", order="C", offset=offset) self._mmaps[chunk_index] = mmap - self._buffers[chunk_index] = memoryview(mmap) + self._buffers[chunk_index] = memoryview(mmap) def pre_load_chunk(self, chunk_index: int, chunk_filepath: str) -> None: # This is called within the prepare chunks thread, so we overlap data loading with data reading.