[codex] Introduce LazyArray abstraction for HDF5-backed DataStub#800
Draft
ehennestad wants to merge 9 commits intorefactor-hdf5-backend-readerfrom
Draft
[codex] Introduce LazyArray abstraction for HDF5-backed DataStub#800ehennestad wants to merge 9 commits intorefactor-hdf5-backend-readerfrom
ehennestad wants to merge 9 commits intorefactor-hdf5-backend-readerfrom
Conversation
…-add-lazy-array-generalization
…-add-lazy-array-generalization
…azy-array-generalization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This stacked PR implements the milestone 2 lazy-read seam on top of
refactor-hdf5-backend-reader.It introduces a backend-aware
LazyArrayabstraction for lazy dataset access, adds an HDF5 implementation, and refactorsDataStubto delegate lazy reads through that abstraction while keeping scope HDF5-only.What Changed
io.backend.base.LazyArrayio.backend.hdf5.HDF5LazyArraytypes.untyped.DataStubto delegate metadata lookup and lazy loads through a backend lazy arrayio.backend.hdf5.HDF5Readerto wrap non-scalar non-empty datasets inDataStubbacked byHDF5LazyArrayHDF5LazyArraycoverageWhy
DataStubpreviously embedded HDF5-specific dataset metadata and read logic directly. That made lazy reads another HDF5-hardcoded seam in the Phase 1 architecture.This change moves that responsibility behind a backend abstraction so the public lazy dataset proxy remains stable while storage-specific behavior lives in backend code.
Impact
DataStubremains the public lazy dataset objectDataStubrefactorValidation
tests.unit.io.backend.BackendFactoryTesttests.unit.io.backend.HDF5LazyArrayTesttests.unit.io.backend.HDF5ReaderTesttests.unit.dataStubTesttests.unit.nwbReadTesttests.unit.io.ParseDatasetTesttests.unit.dataPipeTest