feat: columnar ObservationFrame observation storage (#68)#74
Merged
Conversation
One u32 level column per factor plus f64 loading columns (provisioning for varying slopes), each independently borrowed or owned via Cow. Design/Solver trade the storage type parameter for a lifetime; ingest normalizes any ArrayView2 layout to contiguous columns, and the gather/scatter kernels read columns directly (scale as Option, hoisted per chunk).
The negative-column-stride clause guarded ArrayStore's unsafe fast path; to_slice()-based ingest borrows any stride-1 column zero-copy, so only a non-unit row stride forces a copy.
a2089b0 to
4026ff9
Compare
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.
Closes #68.
Replaces the
Storetrait and its backends (ArrayStore,FactorMajorStore,InternalStore) with a single Cow-backed columnarObservationFrame: per-factoru32level columns plusf64loading columns (provisioning for varying slopes), length-validated at construction, with a row-alignedpermutedgather backing the locality sort.Design<S>/Solver<S>→Design<'a>/Solver<'a>;from_store→from_frame. Core, PyO3 boundary, tests, and benches rewired.BuildError::ObservationCountMismatchreports the offending column index.IntoDesignre-exported from the crate root and reused for thePySolvercategories ingest;validate_weightsmoved ontoDesign; redundantFactorMajorbench arm dropped.No Python surface change. Parity bench vs the pre-frame baseline: no regressions, −1…−6% on the input paths.